【问题标题】:NSURLConnection finished with error iOS13 simulator and MACOS 10.14.6NSURLConnection 以错误 iOS13 模拟器和 MACOS 10.14.6 完成
【发布时间】:2019-10-21 08:40:27
【问题描述】:

我的项目正在 Xcode10 模拟器上工作,但不在 Xcode 11 模拟器上。出现如下屏幕截图所示的错误

【问题讨论】:

    标签: ios-simulator nsurlconnection ios13 xcode11


    【解决方案1】:

    这个错误很可能是由 iOS 13 中更新的 ATS 限制引起的,请参阅https://support.apple.com/en-us/HT210176

    您可以通过nscurl --ats-diagnostics https://www.example.com 在控制台上获取有关有问题的 TLS 连接/-Certificates 的更多详细信息,请参阅Identifying the source of blocked connections

    https://www.ssllabs.com/ssltest/ 是检查服务器 TLS 配置的一个简单选项

    尝试通过在 Info.plist 中设置 NSAllowsArbitraryLoads = true 来完全禁用 ATS,请参阅 NSAppTransportSecurity。如果可行,请尝试检测确切的问题,解决它,然后删除 NSAllowsArbitraryLoads 条目。

    【讨论】:

      猜你喜欢
      • 2018-10-08
      • 1970-01-01
      • 2018-05-17
      • 1970-01-01
      • 1970-01-01
      • 2015-06-02
      • 2018-03-26
      • 1970-01-01
      • 2020-08-20
      相关资源
      最近更新 更多