I got issue. issue of access of class of javascript message
func webView(_ webView: WKWebView, runJavaScriptConfirmPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo,
completionHandler: @escaping (Bool) -> Void) {
let attributedString = NSAttributedString(string: message, attributes: [
NSAttributedString.Key.font : Utility.getFont(fontName: FONT.RobotoRegular, sizeOfFont: FONT_SIZE.FOURTEEN),
NSAttributedString.Key.foregroundColor : UIColor.black
])
let alertController = UIAlertController(title: nil, message: "", preferredStyle: .alert)
alertController.setValue(attributedString, forKey: "attributedMessage")
alertController.view.tintColor = UIColor.black
alertController.addAction(UIAlertAction(title: LocalizationSystem.sharedInstance.localizedStringForKey(key: "ok", comment: "").uppercased(), style: .default, handler: { (action) in
self.isExternal = 1
completionHandler(true)
}))
alertController.addAction(UIAlertAction(title: LocalizationSystem.sharedInstance.localizedStringForKey(key: "cancel", comment: "").uppercased(), style: .default, handler: { (action) in
self.isExternal = 0
completionHandler(false)
}))
present(alertController, animated: true, completion: nil)
}
when I am using this method getting success
Thanks