Xcode 版本:Version 7.1.1
在使用http访问网络图片时出现:
2016-03-04 21:32:29.369 GNote[1720:29160] 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.
经网上搜索,得知此版本默认使用https访问网络资源
网上有些答案为:
在Info.plist中添加 NSAppTransportSecurity 类型 Dictionary ;
在 NSAppTransportSecurity 下添加 NSAllowsArbitraryLoads 类型Boolean ,值设为 YES;
在网上看到另外一种答案:
在Info.plist中添加App Transport Security Settings,类型 Dictionary;
在App Transport Security Settings下面在添加Allow Arbitrary Loads,属性boolean,值设为YES
注意以上添加有自动补全功能,
添加完之后不出现以上错误。