您好我收到以下錯誤:域= NSURLErrorDomain代碼1202
Error Domain=NSURLErrorDomain Code=-1202 \"The certificate for this server is invalid. You might be connecting to a server that is pretending to be 「server-prod.name-cloud.com」 which could put your confidential information at risk.\" UserInfo={NSErrorFailingURLStringKey= https://server-prod.name-cloud.com /v3/project/session/926B9E6BE31B/, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey= https://server-prod.name-cloud.com /v3/project/session/926B9E6BE31B/, _kCFStreamErrorCodeKey=-9843, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be 「server-prod.name-cloud.com」 which could put your confidential information at risk.}
我讀了所有的relevant docs,我們適用於「常見故障」部分中的所有要求。
更多細節:
- 只能從德國收到的錯誤(除4倍,在過去2W,這是來自意大利)
- 它不是房子重複性噸重試後
- 最終上傳去扔
- 這是收到展臺的iOS 10.XX & 9.xx
- 我用Amazon的服務器與2016-08 SSL Security Policies, 所以要根據apple應該OK
在應用中使用:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
說明 - 在生產中我總是使用HTTP的,我離開NSAllowsArbitraryLoads因爲一些測試離岸可潰敗切換到HTTP進行調試。
您看過[[http://lithium3141.com/blog/2015/08/21/shipping-an-app-with-app-transport-security/](http://lithium3141.com/blog/ 2015/08/21/shipping-an-app-with-app-transport-security /) –