最近在做 iOS9 的网络适配,公司用的 HTTP 协议,因为 iOS9 ATS 导致项目不能正常使用,报错是
Failed to send request for reason:Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."
显然是 ATS 的问题。但是我修改了 Info.plist 文件之后还是报错,而且报错信息没有变,请问大家有没有遇到的或者有什么解决方案吗?
还有,我是这样修改的 Info.plist
文件:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>