I am using WKWebView to open up example.com, and on there I have a test link which is supposed to open up a JS alert, but I can't get it to display on the device, it only works if I view the site from browser.
I am using WKUIDelegate, and added this piece of code to the ViewController.swift file:
func webView(webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: (() -> Void)) {
NSLog(Hello)
}
I don't see anything in the XCode console when I click the link that spawns the JS alert.
What am I missing?