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,加入如下设置:



    ....
   NSAppTransportSecurity
   
    NSAllowsArbitraryLoads
    
   

 

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


屏幕快照 2015-11-16 下午7.03.38.png

你可能感兴趣的:(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.)