在我们创建工程, 通过网络链接下载图片的时候, 一旦出现如下错误信息, 肯定是忘记设置HTTP请求
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.
解决方案:
第一步: 点开info.plist文件-->点击箭头所指的+号
![](https://i-blog.csdnimg.cn/blog_migrate/434a705259021257f72b56bd7cf4425a.webp?x-image-process=image/format,png)
第二步: 选中 App Transport Security Settings
![](https://i-blog.csdnimg.cn/blog_migrate/85b65050ed54b0ef7faa3ce1b254e106.webp?x-image-process=image/format,png)
第三步:
注意: 1. 先点击小箭头, 方向朝下.
2. 然后点击+号
3. 选中 Allow Arbitrary Loads
![](https://i-blog.csdnimg.cn/blog_migrate/4037a7bb0663d14be2d829aa6e8ddc59.webp?x-image-process=image/format,png)
第四步: 选中为:YES
![](https://i-blog.csdnimg.cn/blog_migrate/22500acc442dd9543df82eab058f9270.webp?x-image-process=image/format,png)
文/kevinoba(简书作者)
原文链接:http://www.jianshu.com/p/41cea0065e1f
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
原文链接:http://www.jianshu.com/p/41cea0065e1f
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。