There are a few things you can check:
-
Verify that the
<a href
links doesn’t containtarget="_blank"
attribute since WKWebView doesn’t know how to open the link in a new tab. see https://stackoverflow.com/a/25853806/810466 for how to work around that. -
Check if the link is HTTPS or update the
App Transport Security Settings
with theAllow Arbitrary Loads
option -
Make sure that you start the loading request only after adding the WKWebView to the view hierarchy in
didMoveToParentViewController:
since it may make javascript to fail if it tries to run outside the view hierarchy -
Implement the WKWebView NavigationDelegate methods and make sure you return
WKNavigationActionPolicyAllow
when deciding the policy for the request