App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.

Xcode 7, 涉及到了访问http资源,测试时碰到如下报错:

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. 

解决方法:
打开 工程主目录下info.plist
增加属性字典 App Transport Security Settings
在这个属性下增加节点 Allow Arbitrary Loads, value 为 YES

标签

发表评论