uiwebview

Xamarin iOS app being rejected for UIWebView after following guide

淺唱寂寞╮ 提交于 2020-05-16 22:33:11
问题 We have a new app we are trying to submit to the app store (using TestFlight for pre-release beta testing) but are getting an Invalid binary message due to the reference of UIWebView: TMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. We've followed the guide provide by Xamarin here: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/webview?tabs=macos#uiwebview-deprecation-and

Access Meta Data from UIWebView

ε祈祈猫儿з 提交于 2020-05-07 12:24:29
问题 How to access Meta Data of a HTML page loaded into a UIWebView in iOS? 回答1: You can access the meta tag's content by, NSString *graphURL = [webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByName('facebook_share') [0].getAttribute('content')"]; where you can change the attribute name declared in 'content' 回答2: To extract the author in <html><head> <meta name="Author" content="Bloody Mary"> </head><body></body></html> wrap the javascript in a function, save it as file

Capture redirect url in wkwebview in ios

≯℡__Kan透↙ 提交于 2020-05-07 11:27:05
问题 How do I capture the redirection url in when using WKWebView like if a webpage redirects to another page on submitting the username and password or some other data. I need to capture the redirected url. Is there any method in WKNavigationDelegate to override? 回答1: Use this WKNavigationDelegate method public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Swift.Void) { if(navigationAction

Capture redirect url in wkwebview in ios

半腔热情 提交于 2020-05-07 11:26:10
问题 How do I capture the redirection url in when using WKWebView like if a webpage redirects to another page on submitting the username and password or some other data. I need to capture the redirected url. Is there any method in WKNavigationDelegate to override? 回答1: Use this WKNavigationDelegate method public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Swift.Void) { if(navigationAction

Capture redirect url in wkwebview in ios

穿精又带淫゛_ 提交于 2020-05-07 11:24:09
问题 How do I capture the redirection url in when using WKWebView like if a webpage redirects to another page on submitting the username and password or some other data. I need to capture the redirected url. Is there any method in WKNavigationDelegate to override? 回答1: Use this WKNavigationDelegate method public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Swift.Void) { if(navigationAction

iOS webview leaves empty space before HTML content

假如想象 提交于 2020-02-28 18:47:06
问题 I have the simplest view. A webview with some static HTML code embedded using the loadHTMLString message. The only thing I've modifed in the webview's properties from the storyboard is the "Scale page to fit" property (it's checked). However, as you can see in the image below, there's an empty space above the HTML that belongs to the webview (if I scroll the content it fills up that space). I've even tried just using... <html> <body><h1>Hello</h1></body> </html> ... but the space is still

Avoid UIWebView load iTunes App

*爱你&永不变心* 提交于 2020-02-24 12:00:37
问题 How to avoid an UIWebView from opening the iTunes App when loading an iTunes URL? Example URL: http://itunes.apple.com/nl/app/bluppr-postcards/id348147229?mt=8 Above URL loads the iTunes App directly. UIWebViewDelegate doesn't seem to be able to control this to just load the page in the UIWebView. It seems it's controlled by the JavaScript function detectAndOpenItunes(); in the body tag of the page. Any ideas? 回答1: You're right that the relevant function is detectAndOpenItunes(), which is

How to get rid from question mark in a blue square in UIWebView?

你说的曾经没有我的故事 提交于 2020-02-08 03:19:09
问题 In my iPhone application I'm parsing RSS feed to get html and keep it. Afterwards I display this html in UIWebView. The problem is that html contains urls of images, if there is network connection everything is ok, UIWebView loads and displays these images, but if there is no connection it shows text but in place of images shows frame with blue square inside How can I get rid of it? Thank you 回答1: Check programmatically to make sure that you have an internet connection. See this question and

How can i volume set in uiwebview with swift?

╄→尐↘猪︶ㄣ 提交于 2020-02-07 21:49:15
问题 I play video using YouTube iFrame. Closed youtube controls in webview perfectly. player.playVideo(),player.stopVideo() working but player.mute() and player.Setvolume (60) does not. does anyone help me? i am using this module https://github.com/gilesvangruisen/Swift-YouTube-Player/ 回答1: YouTube Api Most of the JavaScript Player API functions have Objective-C equivalents, though some of the naming may differ slightly to more closely match Objective-C coding guidelines. Notable exceptions are

iPhone - webViewDidFinishLoad not called

拜拜、爱过 提交于 2020-02-02 07:26:29
问题 I have a simple View into IB that contains just a UIWebView and a UIButton. The webView is retained, connected, not nil, the delegate property os also connected, the Controller is UIWebViewDelegate compliant and set in the .h. in ViewDidLoad, I use [self.webView loadHTMLString:htmlContent baseURL:nil] ; The content loads, but webViewDidFinishLoad is never triggered, neither didFailLoadWithError , neither webViewDidStartLoad . How can I know when my content has finished loading , as it take a