Questions tagged [wkwebviewconfiguration]
155 questions
5
votes
0 answers
How to send cookies in WKWebView httpcookiestore along with request
In an iOS 11 app, I've set cookies in my WKWebView and verified that they're set by viewing them in safari inspector. However, I don't believe they're being passed along in my request. Is there something else I need to do besides setting them in…
![](../../users/profiles/2047476.webp)
Frankie
- 10,568
- 2
- 44
- 55
5
votes
0 answers
How to return data from WKWebView to JavaScript
I am developing a hybrid Android and iOS app using WebViews. However, I am struggling to return data from iOS app back to my Javascript.
Below is how I setup the WebView to receive data from my JavaScript functions.
private lazy var…
![](../../users/profiles/4847509.webp)
tinOfBeans
- 537
- 1
- 8
- 21
5
votes
0 answers
Cordova Ionic 2 WKWebView hide scroll bars
I'm trying to remove all scrollbars from my ionic 2 app using the WKWebView
I can hide them with css using the standard webview, but when using the WKWebView it does not work.
I have tried editing the CDVWKWebviewEngine.m file with the following but…
![](../../users/profiles/1154037.webp)
rorypicko
- 4,435
- 3
- 24
- 43
5
votes
1 answer
WKWebView completionHandler called before dismissal
I am using WKUIDelegate this function to handle javascript alert
-(void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler
{
…
![](../../users/profiles/1202683.webp)
hariszaman
- 7,457
- 2
- 35
- 53
5
votes
2 answers
JS calling a function in Swift
I know how to send message from JS to native IOS swift app:
func userContentController(userContentController: WKUserContentController!, didReceiveScriptMessage message: WKScriptMessage!) {
println("JavaScript is sending a message…
![](../../users/profiles/498727.webp)
Michael A
- 5,444
- 15
- 62
- 115
5
votes
0 answers
Making WKWebView not share cookies with Safari in OS X
How do I make WKWebView not share cookies with Safari in OSX?
I have a very simple app that I made as an experiment that displays a WKWebView and as far as I can see, it's picking up cookies from Safari, because in my custom app, I'm logged in in…
![](../../users/profiles/6068.webp)
pupeno
- 256,034
- 114
- 324
- 541
4
votes
1 answer
"loadHTMLString" height width issue with WKWebView
I am trying to load HTML content to WKWebView, It does not load properly the same as screen height/width, same code is working fine with UIWebView, See the following code
webView.loadHTMLString(htmlString!, baseURL: nil)
HTML string content