I am trying to load a page into UIWebView on iOS9 using https:// URL. The page loaded includes CSS and images from an insecure server.
E.g. the page loaded:
Below procedure enable me to open not secure content in WKWebView.
I have added below wkwebview delegate method:
func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!)) }
For 2nd step don't forget to register delegate as:
override func viewDidLoad() { super.viewDidLoad() self.webView.navigationDelegate = self }