IOS9网络请求报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
今天下载Xcode7试了下,运行项目时报上面的错误,网上查了下原来iOS9引入了新特性App Transport Security (ATS)。详情:App Transport Security (ATS)新特性要求App内访问的网络必须使用HTTPS协议。但是现在公司的项目使用的是HTTP协议,使用私有加密方式保证数据安全。现在也不能马上改成HTTPS协议传输。
解决方法:
- 在Info.plist中添加
NSAppTransportSecurity类型Dictionary。 - 在
NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

IOS9网络请求报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.的更多相关文章
- Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport Xcode7 beta 网络请求报错:The ...
- The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.问题解决
didFailLoadWithError(): Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loa ...
- 网络请求报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
iOS9引入了新特性App Transport Security (ATS).详情:App Transport Security (ATS) 如果你想设置不阻止任何网络,只需要在info.plist文 ...
- AFNetworking 提示"The resource could not be loaded because the App Transport Security policy requires the use of a secure connection" 解决办法
原因:iOS9以后,苹果把原http协议改成了https协议,所以不能直接在http协议下GET/POST 解决方案之一: 直接编辑工程文件下的Info.plist文件,加入以下代码 <key& ...
- xcode9.4 报错 error:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
原因 http | https 协议 不能正常使用 找到的解决方案 但是在字段名上有了变化,不过复制进去 还是会自动选择对应的 解决办法 1. 在Info.plist中添加 App Transpor ...
- The resource could not be loaded because the App Transport Security policy requires the use of a secure connection
xmpp 项目中遇到的问题,用苹果的通信API 写一个PUT 方法,向服务器上传一张图片.遇到如题问题. Plist 文件没有NSAppTransportSecurity属性 Dic,添加该属性,再添 ...
- Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport Security policy requir
今天升级Xcode 7.0 bata发现网络访问失败.输出错误信息 The resource could not be loaded because the App Transport S ...
- 网络请求出错:The resource could not be loaded because the App Transport
Google后查证,iOS9引入了新特性App Transport Security (ATS).详情:App Transport Security (ATS) 新特性要求App内访问的网络必须使用H ...
- Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport
Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport Xcode7 beta 网络请求报错:The ...
随机推荐
- WPF 内部Template 动画板 无法冻结此 Storyboard 时间线树供跨线程使用
解决此问题,需要一定的想象力. 换个思路即可 大体是 使用Tag或者别无用的可以输入数值的属性,或者附加属性也可以的.来绑定到你要动画的属性 当然这个过程中要使用转换器了 我给出一个关于Button ...
- 【Oracle 12c】最新CUUG OCP-071考试题库(57题)
57.(14-17) choose two: Examine the structure of the DEPARTMENTS table You execute the following comm ...
- c++ 多态总结
C++的多态性用一句话概括就是: 在基类的函数前加上virtual关键字,在派生类中重写该函数,运行时将会根据对象的实际类型来调用相应的函数. 如果对象类型是派生类,就调用派生类的函数:如果对象类型是 ...
- 《快学Scala》第三章 数组相关操作
- 搭建一个ES6开发环境
一.首先先建立一个项目工程目录,并在目录下建立两个文件夹:src和dist src:书写ES6代码的文件夹,写的js程序都放在这里. dist:利用Babel编译成的ES5代码的文件夹,在HTML页面 ...
- [转] FFmpeg常用基本命令
[FFmpeg]FFmpeg常用基本命令 1.分离视频音频流 ffmpeg -i input_file -vcodec copy -an output_file_video //分离视频流 ffmpe ...
- 爬虫实战2:爬头条网美图--Ajax图片加载处理
完整代码经测试可成功运行,目的是抓取头条网输入街拍后的图片,涉及的知识点如下 1. md5加密使用方法 方法1:不创建实例对象,直接使用 >>> from hashlib impor ...
- eclipse的classpath(build path)和classpaht几种设置的方式
1,默认eclipse有自己的classpath的路径并不是环境变量中配置的classpah. 2,eclipse的classpath每个项目不同,一般是在工作区的当前项目的class下. 2.1,可 ...
- 2016级算法第六次上机-F.AlvinZH的学霸养成记VI
1082 AlvinZH的学霸养成记VI 思路 难题,凸包. 分析问题,平面上给出两类点,问能否用一条直线将二者分离. 首先应该联想到这是一个凸包问题,分别计算两类点的凸包,如果存在符合题意的直线,那 ...
- mybatis的mapper.xml使用parameterType使用的报错
错误在于一个写的get(Long id)的查询方法, 而在Mapper.xml中我定义了这个接收的参数的类型是int类型, 结果就报了如下的错误 org.mybatis.spring.MyBatisS ...