错误描述:
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app‘s Info.plist file.
在iOS9中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。
解决方法:
在info.plist 加入key
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
或按下图所示添加内容

本文介绍在iOS9中因苹果更新安全策略导致应用无法加载HTTP资源的问题,并提供了解决方案,即通过在Info.plist文件中配置NSAppTransportSecurity来允许加载任意HTTP请求。
788

被折叠的 条评论
为什么被折叠?



