调用第三方库时,出现如下问题。
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) Error: An SSL error has occurred and a secure connection to the server cannot be made.
如何解决这个问题。
最佳答案
将下面提到的代码添加到您的 info.plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>hiveage.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<!--key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<!--Include to specify minimum TLS version-->
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.2</string>
</dict>
</dict>
</dict>
关于IOS 9 Ipad kCFStreamErrorDomainSSL, -9802,如何解决这个问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34058711/