Xcode7禁用了明码的HTTP请求,苹果将原http协议改成了https协议,使用
TLS1.2 SSL加密请求数据。会出现以下error:
Application 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.
解决方法:应该在info.plist里添加如下字段:
<key>NSAppTransportSecurity</key><dict>
<key>NSAllowsArbitraryLoads</key>
<true/></dict>
即:
本文详细介绍了Xcode7禁用明文HTTP请求后出现的安全错误及解决方法,通过在Info.plist中添加NSAppTransportSecurity字段配置临时例外,实现HTTPS加密请求数据的正常运行。
3841

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



