我一直在开发一个应用程序...自从 iOS 11 更新禁用 ATS 不再起作用后,我在 info.plist 中添加了以下内容
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
我无法使用域异常(exception) key ,因为我正在从未知域下载图像。 以下是我尝试下载图像时得到的结果
Task <C3DC30F1-5869-46F6-ABA4-5E1EC8334FD8>.<0> HTTP load failed (error code: -1005 [4:-4])
NSURLConnection finished with error - code -1005
最佳答案
我知道 IOS 11 不再支持以下功能:
- RC4 3DES-CBC AES-CBC
- MD5 SHA-1
- <2048 位 RSA 公钥 - 与服务器的所有 TLS 连接
- http://
- SSLv3
- TLS 1.0
- TLS 1.1
添加以下内容我们可以绕过 ATS(应用程序传输安全)错误:
<key>NSAppTransportSecurity</key> <dict>
<key>NSExceptionDomains</key>
<dict>
<key>mydomain.com</key>
<dict>
<!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict> </dict>
引用链接:iOS 11 ATS (App Transport Security) no longer accepts custom anchor certs?
关于ios - 应用程序传输安全性不再适用于 iOS 11 Xcode 9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47300932/