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
324
votes
7 answers

Why I get the console warning: [Process] kill() returned unexpected error 1 when I load a WKWebView in iOS13.2?

Since I installed the iOS 13.2 beta, I have been getting a debug console error message. It happens every time I load a ViewController with a WKWebView object in the storyboard. Then the following message is shown continuously while the web view is…
L33MUR
  • 4,002
  • 2
  • 12
  • 27
177
votes
10 answers

Xcode 9 GM - WKWebView NSCoding support was broken in previous versions

Does anyone know how to fix this error with Xcode 9 GM? I'm working on an app made with Xcode 8.3, the deployment target is for iOS 9.3 and I never had this problem before. I don't find any information here or on Apple forums yet :( Edit: This…
Mehdi Chennoufi
  • 2,193
  • 2
  • 11
  • 16
169
votes
25 answers

Can I set the cookies to be used by a WKWebView?

I'm trying to switch an existing app from UIWebView to WKWebView. The current app manages the users login / session outside of the webview and sets the cookies required for authentication into the the NSHTTPCookieStore. Unfortunately new WKWebView…
Col
  • 2,300
  • 3
  • 16
  • 16
166
votes
15 answers

Why is WKWebView not opening links with target="_blank"?

WKWebView does not open any links which have target="_blank" a.k.a. 'Open in new Window' attribute in their HTML -Tag.
stk
  • 6,311
  • 11
  • 42
  • 58
131
votes
3 answers

Migrating from UIWebView to WKWebView

I'm migrating from UIWebView to WKWebView, how can I rewrite these function for WKWebView? func webViewDidStartLoad(webView: UIWebView){} func webViewDidFinishLoad(webView: UIWebView){} and func webView(webView: UIWebView,…
Phocs
  • 2,430
  • 5
  • 18
  • 35
128
votes
14 answers

WKWebView not loading local files under iOS 8

For previous iOS 8 betas, load a local web app (in Bundle) and it works fine for both UIWebView and WKWebView, and I even ported a web game using the new WKWebView API. var url = NSURL(fileURLWithPath:NSBundle.mainBundle().pathForResource("car",…
Lim Thye Chean
  • 8,704
  • 9
  • 49
  • 88
123
votes
10 answers

Request Permission for Camera and Library in iOS 10 - Info.plist

I have implemented a WKWebView in an app. there's a file input in the shown web page where it should import an image from photos. Whenever i press on that input and select either "Take Photo" or "Photo Library" the app suddenly crash, which I…
Alamri
  • 2,112
  • 2
  • 16
  • 21
119
votes
12 answers

WKWebView equivalent for UIWebView's scalesPageToFit

I am updating my iOS app to replace UIWebView with WKWebView. However I don't understand how to achieve the same behavior with WKWebView. With UIWebView I used scalesPageToFit to ensure the web pag was displayed with the same size as the screen size…
olinsha
  • 1,195
  • 2
  • 8
  • 5
116
votes
15 answers

com.apple.WebKit.WebContent drops 113 error: Could not find specified service

I am using WKWebView for viewing custom HTML. Regardless of HTML content, when testing on real device, I receive the following error Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service in 29 sec after…
Ievgen
  • 1,999
  • 2
  • 12
  • 24
96
votes
23 answers

ITMS-90809: Deprecated API Usage -- Apple will stop accepting submissions of apps that use UIWebView APIs

Yesterday, I uploaded my App to TestFlight and after a while Apple sent me this warning: ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See…
Nick
  • 1,434
  • 1
  • 10
  • 19
96
votes
12 answers

WKWebView in Interface Builder

It seems that the IB object templates in XCode 6 beta are still creating old-style objects (UIWebView for iOS and WebView for OSX). Hopefully Apple will update them for the modern WebKit, but until then, what is the best way to create WKWebViews in…
Adam Fox
  • 3,438
  • 5
  • 23
  • 20
93
votes
7 answers

WKWebView causes my view controller to leak

My view controller displays a WKWebView. I installed a message handler, a cool Web Kit feature that allows my code to be notified from inside the web page: override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) let url =…
matt
  • 515,959
  • 87
  • 875
  • 1,141
86
votes
20 answers

How to determine the content size of a WKWebView?

I am experimenting with replacing a dynamically allocated instance of UIWebView with a WKWebView instance when running under iOS 8 and newer, and I cannot find a way to determine the content size of a WKWebView. My web view is embedded within a…
Mark Smith
  • 993
  • 1
  • 7
  • 7
81
votes
14 answers

Getting all cookies from WKWebView

while getting cookies from UIWebView seems straightforward by using NSHTTPCookieStorage.sharedHTTPCookieStorage(), it seems WKWebView stores the cookies somewhere else. I did some research, and I was able to get some cookies from the grabbing it…
aporat
  • 5,922
  • 5
  • 32
  • 54
81
votes
5 answers

WKWebView not in Xcode

I need to implement the WKWebview for my ios app with Xcode. However i have error when using it "undeclared type 'WKWebview'". Do i missing anything important. I'm using the latest Xcode7 download from App Store.
kaneyip
  • 1,237
  • 1
  • 17
  • 21
1
2 3
99 100