uiwebview

Image with data uri src not loading in UIWebView

寵の児 提交于 2019-12-08 18:30:37
I have a simple image populated from a data uri that loads fine in MobileSafari, but when I load the same webpage in a UIWebView, it shows as a broken image: <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxQSEhQUEhQUFBUUFBQUFBcVGBUUFhUVFRUWFhQUFBQYHSggGBolHBQUITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGiwkHx8sLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCw3NyssLC4rLP/AABEIAMEBBQMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAABAAIDBAUGBwj/xAA8EAABBAAEBAIJAwIFBAMAAAABAAIDEQQSITEFQVFhBnETIjJCgZGhsfAUwdFS4QdDkqLxI2JyghUzU//EABkBAAMBAQEAAAAAAAAAAAAAAAABAwIEBf

Crash when use UIWebview on iPad and iPhone running iOS 10.0 on Wi-Fi connected to an IPv6 network

假如想象 提交于 2019-12-08 17:47:24
Iphone app rejected because of the the reason that “We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 10.0 on Wi-Fi connected to an IPv6 network.” Anyone can help to solve it? First time when my application load. It need to push notification to server: - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken{ NSString *token = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]]; token = [token stringByReplacingOccurrencesOfString:@

iOS uiwebview crash in WebThread

徘徊边缘 提交于 2019-12-08 15:47:14
问题 I'm looking for some advice or help diagnosing this crash that I am seeing. For the moment, I think it is probably a webkit bug, but anything is possible, so please provide any insight you may have: Incident Identifier: AEB8EE37-E5D4-4975-97F4-2B2038AC225A CrashReporter Key: 92349a05395ea832c40c49c9e48997c1d65a2371 Hardware Model: iPad3,3 Process: Touch [242] Path: /var/mobile/Applications/4D2CAEEE-D0F8-4BB4-989A-F8623C877C78/Touch.app/Touch Identifier: StayinFrontTouch Version: 3.2.40 (3.2

Webview playback control programmatically for YouTube video in iOS

好久不见. 提交于 2019-12-08 14:40:19
问题 In My App, User can open YouTube from UIWebview, I got notification when plays video in full screen, but I can't get control programmatically like mpmovieplayer controller to pause, play, stop. How can I get it in webview? 回答1: Whenever you want to stop the music load the "" url to web view. So it will stop. This is the code: [_Music_WbView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString: [NSString stringWithFormat:@""]]]]; _Music_WbView.hidden = YES; if([_Music_WbView

uiwebview not loading the web page

可紊 提交于 2019-12-08 13:52:28
问题 in my program uiwebview is not loading the url address.when i nslogged the request object is not null.however when i nslog the webview.request it returns null.what may be the reason it is not loading - (void)viewDidLoad { [super viewDidLoad]; self.web = [[UIWebView alloc] init]; NSString *urlAddress = @"http://www.google.com"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; NSLog(@"%@",requestObj); [self.web loadRequest:requestObj];

Maintaining session in after closing UIWebView

本小妞迷上赌 提交于 2019-12-08 13:40:35
I have an application which has a login page resides on the application server. So I open a UIWebView to handle the login. After then I want to switch to the UIView and make API calls using ASIHttp library (others may also be acceptable). The problem is; after I login server keeps session object for authentication purpose, so when I close the UIWebView and switch to a UIView and make an API call, it fails. I believe, somehow I need to maintain session object (set after login) in the API calls. How can I achieve this? Here are the steps I followed: Extract the cookies in UIWebView using

Links inside Pdf on Webview are not opening in a browser in iPhone

做~自己de王妃 提交于 2019-12-08 13:20:35
问题 I have parsed urls of pdfs and showing pdf on a webView, but my Links inside webviews are not opening in a browser.i have not used CGPDFDocument. my code is simple :). can anyone help me out.i have seen many similar questions but all are using Quartz. code :- @class AppDelegate_iPhone; @interface PdfShowViewController : UIViewController<UIWebViewDelegate> { IBOutlet UIWebView *pdfWebview; AppDelegate_iPhone *appDelegate; NSMutableData *receivedData; IBOutlet UIActivityIndicatorView

UIWebView set user-agent at run time [duplicate]

我的梦境 提交于 2019-12-08 12:39:49
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: UIWebView iOS5 changing user-agent There is requirement to open some website in desktop version and some in mobile version. how to set different user agent in UIWebView's delegate 'webView:shouldStartLoadWithRequest:navigationType'. Thanks in advance. 回答1: Refer allow-overriding-of-user-agent-on-uiwebview link. Refer iphone-ipad-get-user-agent-for-uiwebview link Also refer uiwebview-ios5-changing-user-agent SO

iPhone UIWebView problem

為{幸葍}努か 提交于 2019-12-08 12:21:12
问题 I am trying to write an application to show a web page in a web view for this link: http://just4u.safeway.com But the page can not be shown in the UiWebView, I got a message: This page contains the following errors: error on line 90 at column 11: AttValue: " or ' expected. Can someone let me know what could be the problem? I already added code to handle redirect, but still get the same problem. Thanks 回答1: Try explicitly setting the MIME type of the page to be "text/html". Otherwise it may be

iOS - PDF Loaded in UIWebView then save to iBooks using UIDocumentInteractionController

六月ゝ 毕业季﹏ 提交于 2019-12-08 12:01:51
问题 I am loading a PDF from the web using a UIWebView, which works great and lets me interact with the PDF how I want. Next I would like to be able to save that PDF to iBooks, so I am using a UIDocumentInteractionController. In reading the docs it seems that you can only use UIDocumentInteractionController with local files rather than a remote file like I have. My question is, that PDF that UIWebView loads must be cached somewhere, so I really have to do another call to download that same file,