Questions tagged [wkwebviewconfiguration]
173 questions
3
votes
1 answer
Hide specific DIV on webpage in WKWebview
I am building an iOS app and using WKWebview to link to a external website (we don't control this website) in WKWebview.
It all works fine but there are certain parts of the webpage, I do not want to show in the iOS app.
After doing some research…

vinny
- 529
- 4
- 7
- 16
3
votes
1 answer
WKWebView shows google search result as raw html
I am trying to add a web browser in an app that I'm working on using iOS WKWebView.
But the WKWebView loads the raw html for google search result.
https://i.stack.imgur.com/lx2cD.jpg
Here's a part of the code I'm using:
let configuration =…

Marlo Quidato
- 573
- 5
- 7
3
votes
2 answers
How to autoscale the contents of a WKWebView?
To autoscale a webpage inside a good old WebView in Swift, all I had to do was:
var w:UIWebView
w.scalesPageToFit=true
I cannot find an equivalent method for a WKWebView, and webpages appear too big in my app. How can I autoscale the contents of a…

Josh
- 6,251
- 2
- 46
- 73
2
votes
1 answer
Flutter - Block Webview Cookies in WKWebView
Our flutter app uses webview to give users access to our online retail store. This retails store uses cookies.
This hasn’t been a problem until this week. As of last week, Apple started rejecting our updates because the webview section of the app…

thebenCA
- 149
- 13
2
votes
1 answer
WKWebsiteDataStore.default() vs webView.configuration.websiteDataStore
What is the difference between the WKWebsiteDataStore.DefaultDataStore and the one present in webview configuration instance - Configuration.WebsiteDataStore?
If i delete a specific cookie from HttpCookieStore by accessing the default…

return0
- 93
- 11
2
votes
1 answer
loadHTMLString for a simple WKWebView crashed at runtime with error WebPageProxy::processDidTerminate: (pid 0), reason 3
I'm trying to work with a simple WKWebView with a single button, which upon clicking should callback to the Swift via JavaScript. However, I see the following log in Xcode console and the view loads empty WKWebView:
[pageProxyID=5, webPageID=6,…

Vinod Madigeri
- 167
- 10
2
votes
1 answer
defaultWebpagePreferences error while building ios build for ionic 5 code
I am trying to build an ios build for ionic 5 app, i am getting this error in my app while building the app. I looked out for solutions on internet but nothing seems to…

d3vdpro
- 2,887
- 4
- 25
- 29
2
votes
1 answer
WKHTTPCookieStore HTTPCookieStorage synchronization class
Use case: I have two WKWebViews, one in a main app and one in an app extension. I want them to share the same cookie store.
Apple APIs have 2 different cookie storage classes: WKHTTPCookieStore and HTTPCookieStorage.
Apple also has…

NewEndian
- 559
- 2
- 16
2
votes
1 answer
WKWebview Delegate methods in Objective-C
updating my code from UIWebView to WKWebview but having this error on my delegate methods
Nullability specifier 'nonnull' conflicts with existing specifier 'null_unspecified'
here is my code an showing this error on navigation
-…

Vix Hunk
- 303
- 4
- 17
2
votes
0 answers
How to use the prop allowsInlineMediaPlayback in react-native-WKWebView?
I'm using WKWebview in ios for my react native project. My project requirement is to disable the vidoe taking a full screen by default. This could be done in UIWebView by setting the the prop allowsInlineMediaPlayback to true but WKWebview does not…

Aishwarya R M
- 123
- 1
- 10
2
votes
1 answer
How to inject multiple user scripts in WKWebView to obtain darkmode effect?
I have successfully obtained darkmode effect for random HTML on a website html page using source from this great tutorial.
I have uploaded these photos to explain better what I obtained.
I am trying to obtain the same on a WKWebView.
The HTML is…

Cristi Ghinea
- 474
- 1
- 7
- 20
2
votes
3 answers
WKWebView not playing audio
I am setting a WKWebView but, here the web code contains an audio code which is not working in WKWebView. The device I am using is iPad Mini of iOS version 12.3.1
here is the backend code:-
2
votes
2 answers
How to fetch cookies from WKWebView for iOS 10 and below?
I have tried following approaches to fetch the cookies from WKWebView in iOS 10 and below and not able to get the cookies:
1: Fetching cookies from HTTPCookieStorage.
2: Fetching the cookies form WKNavigationResponse model once the loading is…

Vinay Kiran
- 349
- 5
- 16
2
votes
1 answer
Swift 4 WKWebView cookies fetch and delete synchronisation issue
I am making an app which makes decision of user login / logged out and other activities based on WkWebView cookies. Most of the time , it works fine. Sometimes , it failed to fetch cookies when login URL succeeded. And fails to delete the cookies…

Jamshed Alam
- 12,424
- 5
- 26
- 49
2
votes
2 answers
WKWebView must stop detecting phone numbers
I have WKWebView application, and i want to stop it from parsing phone numbers and links in texts, i set
webView.configuration.dataDetectorTypes = [
WKDataDetectorTypes.address
];
before actually loading page, but it doesn't help, full code…

Itsmeromka
- 3,621
- 9
- 46
- 79