wkwebviewconfiguration

Call a swift function from java script that returns a value using wk webview

五迷三道 提交于 2021-02-08 07:42:35
问题 I want to call a swift function from java script code which returns the device id back to the script, I had added the code that use currently. Please advise how to return the value back to the java script from the swift function, Thanks in advance Code Snippet : super.viewDidLoad() { self.webView = WKWebView() let preferences = WKPreferences() preferences.javaScriptEnabled = true let configuration = WKWebViewConfiguration() configuration.preferences = preferences configuration

How to configure WkWebView in xamarin.forms iOS?

被刻印的时光 ゝ 提交于 2021-01-29 11:35:24
问题 Recently, I can't publish my new app to App Store due to the following error: ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview). Question 1, what is UIWebView and WkWebView? I can't even find a single word "UIWebView" in my project, how Apple knows I'm using it? The pages that I used are all xamarin based and Content Page

WKWebView not detecting URL is different

余生颓废 提交于 2021-01-28 06:34:21
问题 I have 3 URL's I open within my app using a WKWebView . These URL's are used to trigger an SSO into another product, using a cookie set by my app on login. They look as follows shop https://identity.domain.io/auth/some/params/protocol/saml/clients/sso?RelayState=shop_page profile https://identity.domain.io/auth/some/params/protocol/saml/clients/sso?RelayState=profile_page home https://identity.domain.io/auth/some/params/protocol/saml/clients/sso When I open any tabs, the view loads correctly.

Disabling cookies in WKWebView

萝らか妹 提交于 2021-01-24 07:27:01
问题 Is it possible at all to disable cookies and local storage in a WKWebView? Let's say that this is my setup, and I want to add something that disables them: import UIKit import WebKit class ViewController: UIViewController, WKUIDelegate { var webView: WKWebView! override func loadView() { let webConfiguration = WKWebViewConfiguration() webView = WKWebView(frame: .zero, configuration: webConfiguration) webView.uiDelegate = self view = webView } override func viewDidLoad() { super.viewDidLoad()

Disabling cookies in WKWebView

南笙酒味 提交于 2021-01-24 07:26:36
问题 Is it possible at all to disable cookies and local storage in a WKWebView? Let's say that this is my setup, and I want to add something that disables them: import UIKit import WebKit class ViewController: UIViewController, WKUIDelegate { var webView: WKWebView! override func loadView() { let webConfiguration = WKWebViewConfiguration() webView = WKWebView(frame: .zero, configuration: webConfiguration) webView.uiDelegate = self view = webView } override func viewDidLoad() { super.viewDidLoad()

Disabling cookies in WKWebView

本秂侑毒 提交于 2021-01-24 07:25:55
问题 Is it possible at all to disable cookies and local storage in a WKWebView? Let's say that this is my setup, and I want to add something that disables them: import UIKit import WebKit class ViewController: UIViewController, WKUIDelegate { var webView: WKWebView! override func loadView() { let webConfiguration = WKWebViewConfiguration() webView = WKWebView(frame: .zero, configuration: webConfiguration) webView.uiDelegate = self view = webView } override func viewDidLoad() { super.viewDidLoad()

Shared cookies with WKProcessPool for WKWebView in Swift

一曲冷凌霜 提交于 2021-01-01 18:33:09
问题 Can anyone please tell me how to create a WKProcessPool in Swift? I'm not familiar with Objective-C. I have to create a WKProcessPool in order to have shared cookies with all WKWebViews. I want to keep cookies even when showing another viewcontroller with same class. I tried the following but it's not working. import UIKit import WebKit class ViewController: UIViewController, WKNavigationDelegate { var webView = WKWebView() override func viewDidLoad() { super.viewDidLoad() let processPool =

Shared cookies with WKProcessPool for WKWebView in Swift

ぃ、小莉子 提交于 2021-01-01 17:52:55
问题 Can anyone please tell me how to create a WKProcessPool in Swift? I'm not familiar with Objective-C. I have to create a WKProcessPool in order to have shared cookies with all WKWebViews. I want to keep cookies even when showing another viewcontroller with same class. I tried the following but it's not working. import UIKit import WebKit class ViewController: UIViewController, WKNavigationDelegate { var webView = WKWebView() override func viewDidLoad() { super.viewDidLoad() let processPool =

What is suppressesIncrementalRendering doing?

妖精的绣舞 提交于 2020-06-29 04:08:17
问题 I'm using the newest version of Xcode and Swift . I was googling around to make my KWWebView even faster and found the following: webConfiguration.suppressesIncrementalRendering = true Documentation says the following: A Boolean value indicating whether the web view suppresses content rendering until it is fully loaded into memory. But what does this mean? Does it mean, the html doesn't not get rendered and shown as long as not all resources like images and javascript files are completely