I have a WKWebView
loaded with the following url: mashable article
There are social action icons, namely Facebook, Twitter, etc. I want the webview to be able to respond to these, but no callbacks are called when these are tapped, so nothing happens.
I have the following delegate methods implemented:
public func webView(webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!)
public func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!)
public func webView(webView: WKWebView, didFailNavigation navigation: WKNavigation!, withError error: NSError)
public func webView(webView: WKWebView, decidePolicyForNavigationAction navigationAction: WKNavigationAction, decisionHandler: (WKNavigationActionPolicy) -> Void)
public func webView(webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: () -> Void)
public func webView(webView: WKWebView, runJavaScriptConfirmPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: (Bool) -> Void)
public func webView(webView: WKWebView, runJavaScriptTextInputPanelWithPrompt prompt: String, defaultText: String?, initiatedByFrame frame: WKFrameInfo, completionHandler: (String?) -> Void)
None of the above methods are called when tapping on these social icons, and even worse, the entire set of icons highlights when you tap on one, not just a specific icon (yet no delegates fired)
What is going on here? Am I missing a delegate method to implement that could catch this action?
Edit: I am correctly setting myself as the delegate. Some of the above methods are getting called sometimes, just not when tapping on these social action icons found in the mashable article linked above.