Xcode7 使用NSURLSession发送HTTP请求的问题

错误描述html

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.ios

 

在iOS9 中,苹果将原http协议改为了https协议,使用 TLS1.2 SSL加密请求数据。app

解决方法:post

在info.plist 加入keyui

 

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>


相关文章
相关标签/搜索