Skip to content Skip to sidebar Skip to footer

Ios Wkwebview Javascript Alert Crashing On Ipad

I'm using the solution in this answer that properly displays javascript alert/confirm/etc boxes and it works great on iphones. func webView(_ webView: WKWebView, runJavaScriptAlert

Solution 1:

Figured this one out - wanted to leave a note for anyone else that runs in to this. a small change to the end of the functions:

replace

present(alertController,animated:true,completion:nil)

with

iflet presenter = alertController.popoverPresentationController {
        presenter.sourceView =self.view
    }

    self.present(alertController, animated: true, completion: nil)

Post a Comment for "Ios Wkwebview Javascript Alert Crashing On Ipad"