http下载网络资源报错解决办法
2016-03-03 20:58
281 查看
使用Xcode7编写iOS9应用时,如果获取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.
原因:
从iOS9起,新特性要求App访问网络请求,要采用 HTTPS 协议。
如果仍想要使用HTTP协议,解决办法如下:
1,在Info.plist中添加 NSAppTransportSecurity 类型 Dictionary ;
2,在 NSAppTransportSecurity 下添加 NSAllowsArbitraryLoads 类型Boolean ,值设为 YES;
当然,也可以直接使用Source Code形式打开Info.plist,添加如下配置:
原文出自:www.hangge.com 转载请保留原文链接:http://www.hangge.com/blog/cache/detail_822.html
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.
原因:
从iOS9起,新特性要求App访问网络请求,要采用 HTTPS 协议。
如果仍想要使用HTTP协议,解决办法如下:
1,在Info.plist中添加 NSAppTransportSecurity 类型 Dictionary ;
2,在 NSAppTransportSecurity 下添加 NSAllowsArbitraryLoads 类型Boolean ,值设为 YES;
当然,也可以直接使用Source Code形式打开Info.plist,添加如下配置:
相关文章推荐
- 一个 11 行 Python 代码实现的神经网络
- 稀疏自编码http://deeplearning.stanford.edu/wiki/index.php/Exercise:Sparse_Autoencoder#Results
- Http、TCP/IP协议与Socket之间的区别
- 利用缓存存储网络下载的图片
- Lighttpd源码阅读--网络服务通信模型
- 深入理解http协议
- poj 3436 最大流的增广路算法
- Bashu2445 -- 【网络流24题-10】餐巾问题
- linux网络编程之-----多播(组播)编程
- FD_SET TCP
- HttpApplication的处理管道处理过程简单描述
- BZOJ 2400(网络流最小割)
- 卷积神经网络
- 自编码神经网络
- Http请求中Content-Type讲解以及在Spring MVC中的应用
- HTTP学习笔记——URL与资源
- PHP闭包(Closure)初探(转载 http://my.oschina.net/melonol/blog/126694?p=2#comments)
- Android OKHTTP
- Zigbee单播、组播、广播网络通信
- Android 异步网络请求导致的程序崩溃