用wkwebview加载网络地址,一直提示这个问题
断点奔溃到Uiviewcontroller loadviewifrequired
但是也找不到原因,在plist文件加了所有的域名或者ip地址还是,最后把所有的代理方法全部打log.找到问题
@available(iOS 8.0, *)
func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Swift.Void)
{
XLLog(message: "")
let cred = URLCredential.init(trust: challenge.protectionSpace.serverTrust!)
completionHandler(.useCredential, cred)
}
网友评论