gpt4 book ai didi

ios - 如何在 iOS 中修复 ‘TIC SSL Trust Error’?

转载 作者:可可西里 更新时间:2023-11-01 03:28:59 25 4
gpt4 key购买 nike

当我尝试使用网络服务登录应用程序时。我还设置了我的 plist-file 如下

enter image description here

我收到以下错误。此错误显示在我的控制台上

TIC SSL Trust Error [5:0x1c017fbc0]: 3:0
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
Task <E0C414FF-98C7-4E6B-876F-B9006465C8FD>.<1> HTTP load failed (error code: -1200 [3:-9802]

最佳答案

IKKA - Swift 4.2 版本中的答案

extension CustomViewController: URLSessionDelegate {
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodClientCertificate) {
completionHandler(.rejectProtectionSpace, nil)
}
if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {
let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
completionHandler(.useCredential, credential)
}
}
}

关于ios - 如何在 iOS 中修复 ‘TIC SSL Trust Error’?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46974527/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com