【发布时间】:2017-04-06 13:19:42
【问题描述】:
我有一个应用程序可以处理 http 请求,完全没问题。现在服务器已移至https,因此我需要对 ATS 设置进行一些更改。
它给出了以下错误:
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)
Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and
a secure connection to the server cannot be made."
UserInfo={NSLocalizedDescription=An SSL error has occurred and
a secure connection to the server cannot be made.,
NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?,
_kCFStreamErrorCodeKey=-9801,
NSErrorFailingURLStringKey=https://domain.com,
_kCFStreamErrorDomainKey=3, NSUnderlyingError=0x79094840
我尝试将Allow Arbitrary Loads 设置为YES。但它没有用。
请告知我需要设置什么设置才能正常工作。
【问题讨论】:
-
伙计们,如果您对我的问题投反对票,请至少指出原因。谢谢
标签: ios objective-c swift https app-transport-security