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
1 answer

How to enable Location Services for a WKWebView in Swift?

My Browser app uses WKWebView but when I try to visit a website that needs to use Location Services (like Google Maps, for example), it doesn't work. I have searched for a way to fix it and came across this question. I tried to add the string on the…
PastaCoder
  • 1,031
  • 1
  • 9
  • 16
2
votes
2 answers

WKWebView: calling javascript after page is loaded

I am doing the following: load a WKWebView, lets call this view A ask the user to enter some details ask the user to click a button intercept the click on the WKWebView and PUSH a new view on the application, lets call this view B allow the user…
mm24
  • 9,280
  • 12
  • 75
  • 170
2
votes
2 answers

Detecting when a user clicks on a webform loaded in a UIWebView or WKWebView

I'd like to detect when a user presses a webform button present in an HTML page loaded in an iOS webview (ideally using WKWebView). Is this possible? And if so, how? General comment: I know that WKWebView has some limitations hence if you know a…
mm24
  • 9,280
  • 12
  • 75
  • 170
2
votes
1 answer

How to cache resources loaded by WKWebView?

I use WKWebView to display rich text including images. I want to cache these images on disk. How can I get these HTTP requests and cache the responses?
WildCat
  • 1,961
  • 6
  • 24
  • 35
2
votes
2 answers

iOS UIWebView loadRequest takes too long

I have one UIWebView in my app, -(void)viewDidLaod{ NSURL *url = [NSURL URLWithString:@"some url string"]; NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadRevalidatingCacheData timeoutInterval:30.0]; …
bluenowhere
  • 2,683
  • 5
  • 24
  • 37
2
votes
2 answers

WKWebView remove one item from WKBackForwardList

I'm implementing a tiny browser, so I would like to be able to navigate back and forward on my web view. For these purposes I use WKWebView, but I need to display an Error html page sometimes, and I don't want this page to be stored in my…
BergP
  • 3,453
  • 4
  • 33
  • 58
2
votes
2 answers

Swift: using evaluateJavascript

I'm fairly new to Swift development, and I have a hybrid app I am developing that I have wired up authentication to. When a user authenticates with the fingerprint sensor on a device, I want to trigger a JS or otherwise interact with the…
Thomas W Tupper
  • 625
  • 1
  • 6
  • 17
2
votes
2 answers

Detecting whether a WKWebView has blanked

I am building a simple iOS app using SWIFT. It loads a single page app in WKWebView in the main view full screen. Clicking advertisement would open another WKWebView in a new scene presented modally. However, if I click several pages in the new…
Oliver Zhang
  • 499
  • 6
  • 16
2
votes
0 answers

How does loadHTMLString in WKWebView work?

I am working on a simple SWIFT app which loads a single page app from local file. When the app is launching, I use this code: self.webView!.loadHTMLString("1", baseURL:"http://www.ft.com") It works fine and the page is…
Oliver Zhang
  • 499
  • 6
  • 16
2
votes
0 answers

how do i enable autofill password for a wkwebview

I'd like to enable the "Autofill Password" in my wkwebview. I can't seem to find any documentation or examples online on how to do this.
jackreichert
  • 1,979
  • 2
  • 23
  • 36
2
votes
1 answer

How to host iOS8 Action extension in 3rd party web browser

Let's suppose that i have implemented an iOS web browser, capable of bidirectional communication with Javascript in the webview. What i would have to do if i wanted any iOS8 Action extensions to work in it, as it does in Mobile Safari? There is no…
Pavel Zdenek
  • 7,146
  • 1
  • 23
  • 38
2
votes
2 answers

remove cache in wkwebview objective c

I need to remove cache in wkwebview.I am using below code but no success. [[NSURLCache sharedURLCache]removeCachedResponseForRequest:request]; [[NSURLCache sharedURLCache] removeAllCachedResponses]; [[NSURLCache sharedURLCache]…
Vandana
  • 49
  • 3
  • 7
2
votes
2 answers

Web page of WKWebView not displaying page inside of dispatch_get_main_queue

I'm trying to create multiple WKWebView views inside of a background process and then add them to a view on the main thread once they are all done loading. Each of the WKWebView's contains a chart rendered via javascript so the load time takes about…
TWilly
  • 4,863
  • 3
  • 43
  • 73
2
votes
1 answer

How can I enable Safari web inspector on WKWebView?

I have a hybrid application that uses the WKWebView to display large amounts of text and this in turn uses Javascript extensively to do text analysis. We're currently facing performance problems and I'd like to use the Safari Inspector the same way…
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
2
votes
3 answers

Getting "Thread 1:EXC_BAD_ACCESS" error?

I am creating a simple web viewer using WKWebView and the Swift language. Here is my code. import Cocoa import WebKit @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet var containerView : NSView! = nil …
user1741348
  • 193
  • 3
  • 15
1 2 3
99
100