Questions tagged [wkwebview]

A WKWebView object displays interactive web content. It is provided by Apple's WebKit which is available for macOS, iOS and tvOS as well.

A WKWebView object displays interactive web content. It is provided by Apple's Open Source Project WebKit and is available for macOS, iOS and tvOS as well.

Links:

3852 questions
2
votes
0 answers

URL does not load in uiWebView but takes too long to load in wkWebView and Safari

I am running into an issue where URLs are not loading in uiWebView. While loading in uiWebView the page freezes and have to resort to killing the application to reuse the webView. The URL loads in wkWebView and Safari but takes about 1 minute to…
Amon
  • 99
  • 1
  • 9
2
votes
1 answer

Example of implementing 'WKNavigationDelegate' method 'didReceiveServerRedirectForProvisionalNavigation' method to follow redirects

I need a simple example in Swift to illustrate how I would implement the WKNavigationDelegate method didReceiveServerRedirectForProvisionalNavigation method to follow redirects.
Mars
  • 63
  • 8
2
votes
1 answer

Can using multiple WKWebViews be as fast as reusing the same WebView

My app is much faster when I reuse the same WKWebView for new navigations (but I would love to be able to create new WKWebViews for each navigation so I can maintain a ViewController stack). I've noticed however, that the pages load slower when I…
Michael Cueno
  • 434
  • 4
  • 14
2
votes
1 answer

How to capture(create javascript interface) Web View Response header while click on Login Button in IOS application obj-c?

How to capture HTTP response headers in UIWebview, when user finishes the registration from the web view, the app should be notified with the successful unique id assigned to the user on registration which is passed back in HTTP Response…
sunil singh
  • 111
  • 10
2
votes
0 answers

WKWebview loosing login cookie

I currently have an issue with hybrid application that uses an WKWebView to display a webpage. After the application restarts and creates a new session / WKWebWiew, a new login cookie is given to the WKWebView from the webservice. This works fine in…
oscar
  • 647
  • 1
  • 5
  • 17
2
votes
0 answers

libsodium fails to initialize in wkWebview iOS for certain web apps

I’m using libsodium library for encryption in browser extensions (chrome and safari) for encrypting data retrieved from webpages. I’m also using it in iOS wkWebView browser which works fine for most of the web apps. All I had to do was grab the…
Feru
  • 1,151
  • 2
  • 12
  • 23
2
votes
2 answers

WKWebView Print Response Headers in Swift 2

How can I see the response headers from a WKWebView loadRequest ? eg let url = NSURL(string: "http://www.anywebsite.com")! let urlRequest = NSURLRequest(URL: url) wkWebView.loadRequest(urlRequest) then print the headers in the response.
Agreensh
  • 1,305
  • 1
  • 12
  • 15
2
votes
0 answers

iOS WKWebView HTML5 Video Black Screen on Resume

I'm trying to play some locally downloaded videos on iOS using WKWebView. I copy the files into 'tmp/www' and they play fine. The issue I have is if I resign my activity using home button and bring it back, the video will resume playing but the…
hamobi
  • 7,940
  • 4
  • 35
  • 64
2
votes
1 answer

javascript bridge in WKWebView doesn't work

I try to get javascript message from my Web View with WKWebView. But nothing appear inside IOS console... I implement this code: - (void) webView:(WKWebView *)webView didFailLoadWithError:(NSError *)error { self.webView = [[WKWebView alloc]…
Thomas Dupont
  • 417
  • 6
  • 20
2
votes
1 answer

WKWebView loadData alternative for displaying NSData in iOS 8 (Except UIWebView)

I would like to know if there are any alternatives to the loadData (iOS 9 only) function of WKWebView without using it's older brother UIWebView. Maybe there's a way to display document files (xlsx,docx,pptx,pdf,images) using the loadHTMLString like…
Bryan P
  • 4,142
  • 5
  • 41
  • 60
2
votes
1 answer

ScriptMessageHandler not always called on actual device, works fine on simulator

I use WKWebView and I want to be notified when website is fully loaded. The webView:didFinishNavigation method of WKNavigationDelegate is fired when document.readyState is either interactive or complete and I want to be sure that site was completely…
Sebastian Osiński
  • 2,894
  • 3
  • 22
  • 34
2
votes
1 answer

Does WKWebView support loading of external javascript files?

I'm loading a html template into WKWebView. The HTML has a script tag which refers to a local JS file as mentioned below: But, this js content is not getting loaded into web view at all. So,…
user5857112
  • 21
  • 1
  • 5
2
votes
1 answer

iOS: JavaScript can't run on WKWebView

I use WKWebView to show a web page. When I touch a button on the page, some javascript code should work and show me an alert view. But it doesn't work. If I open the page on Safari, it works well. Here is my code WKWebViewConfiguration…
Han Pengbo
  • 1,338
  • 1
  • 18
  • 37
2
votes
0 answers

WKWebView not loading the images from Documents directory of the application in iOS 9

I am integrating WKWebView as a sub-view of another View Controller to show the conversations between two persons and able to do for normal text conversations. But, the problem is we are not able to load the images from documents directory of the…
Krish Lakshmanan
  • 760
  • 7
  • 13
2
votes
1 answer

Enabling Application Cache in WkWebView using private API in Swift not working

According to sources (1,2) The below category that uses private API usually found in Safari lets WkWebView enable Application cache @interface WKPreferences (MyPreferences) -…
Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241