【问题标题】:NSURLConnection finished with error - code -1202NSURLConnection 完成错误 - 代码 -1202
【发布时间】:2017-11-06 11:40:23
【问题描述】:

当我点击登录服务器时,我收到以下错误消息:

NSURLConnection 完成并出现错误 - 代码 -1202。

我已在我的 Plist 中添加了应用程序传输安全性,并且我已允许所有无效证书为 YES。

【问题讨论】:

标签: ios objective-c


【解决方案1】:

根据 Google 搜索 -1202 = NSURLErrorServerCertificateUntrusted:

帮助链接:

  1. HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted

  2. NSURLConnection Error code (-1202,1012)

参考:Undocumented NSURLErrorDomain error codes (-1001, -1003 and -1004) using StoreKit

还要检查服务器端证书的有效性,因为这可能是此错误的一种可能性

另外,NSURLConnection 已被弃用,我建议通过 NSURLSession 更新它

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-03-26
    • 1970-01-01
    • 1970-01-01
    • 2018-08-06
    • 2018-10-08
    • 2019-08-30
    • 1970-01-01
    • 2017-05-04
    相关资源
    最近更新 更多