libc++abi.dylib: terminating with uncaught exception of type NSException

用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)
        
    }
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容