I am trying to open a URL in safari browser while clicking it from app's iOS WKWebView, but when I call window.open() from javascript which has no effects.
It's not hitting the decide policy in WKWebView,
[Foundation.Export("webViewecidePolicyForNavigationActionecisionHandler:")]
public void DecidePolicy(WKWebView webView, WKNavigationAction navigationAction, Action<WKNavigationActionPolicy> decisionHandler)
I have tried to override WKUIDelegate method, but it's not working. :(
Could anyone help me out?
Since method
DecidePolicy
is contained inside theIWKNavigationDelegate
, so you should implement it notWKUIDelegate
.The method string inside
Export
is incomplete , it should be[Export("webView:decidePolicyForNavigationAction:decisionHandler:")]
There are two ways you can implement the delegate.
Strong Delegate:
Weak Delegate: