Xcode 7中http通信出现如下错误: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. 原因 解决方法

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

解决方法

编辑 info.plist,加入如下设置:

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

在info.plist中查看如下所示:

Xcode 7中http通信出现如下错误: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.
原因
解决方法