一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Xcode 7中http通信出现如下错误:Application Transport Security has blocked a cleartext HTTP (http://)

时间:2015-12-07 编辑:简简单单 来源:一聚教程网

进来买了苹果的证书,发现各种问题。
xcode6 无法在我的iphone6s上进行测试。只好升级到7
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.
字数104 阅读35 评论0 喜欢0
原因
在iOS9 beta1中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。

解决方法
编辑 info.plist,加入如下设置:



    ....
   NSAppTransportSecurity
  
    NSAllowsArbitraryLoads
   
  



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

热门栏目