Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport Security policy requir
2015-09-17 14:54
603 查看
今天升级
输出错误信息
Google后查证,iOS9引入了新特性
Transport Security (ATS)
新特性要求App内访问的网络必须使用
但是现在公司的项目使用的是
在Info.plist中添加
在
Xcode 7.0 bata发现网络访问失败。
输出错误信息
<code style="font-family: Consolas, Menlo, Monaco, 'Courier New', monospace; font-size: 1em; padding: 0px; color: inherit; background-color: transparent; white-space: inherit;">The resource could not be loaded because the App Transport Security policy requires the <span class="hljs-operator"><span class="hljs-keyword" style="color: rgb(133, 153, 0);">use</span> <span class="hljs-keyword" style="color: rgb(133, 153, 0);">of</span> a secure <span class="hljs-keyword" style="color: rgb(133, 153, 0);">connection</span>. </span></code>
Google后查证,iOS9引入了新特性
App Transport Security (ATS)。详情:App
Transport Security (ATS)
新特性要求App内访问的网络必须使用
HTTPS协议。
但是现在公司的项目使用的是
HTTP协议,使用私有加密方式保证数据安全。现在也不能马上改成
HTTPS协议传输。
最终找到以下解决办法:
在Info.plist中添加NSAppTransportSecurity类型
Dictionary。
在
NSAppTransportSecurity下添加
NSAllowsArbitraryLoads类型
Boolean,值设为
YES
相关文章推荐
- HTTP Header 入门详解
- NSHTTPRequest 请求网络,下载性能优化和断点续传
- SEVERE: Error configuring application listener of class com.sun.xml.ws.transport.http.servlet.WSServ
- iOS iOS9下修改回HTTP模式进行网络请求
- 《黑马程序员》Java网络编程 GUI 正则表达式
- Android 使用OkHttp
- HTTP返回码中301与302的区别
- http的相关配置
- 使用AFNetworking加载网络图片
- TCP三次握手和四次挥手
- Nmcli 网络管理命令行工具基础
- IOS9网络请求报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
- HBase架构 http://hbase.apache.org/book.html#_architecture
- 【Android】HttpUrlConnection AsyncTack
- Android网络请求--服务器端从环境搭建到发布过程
- win8系统如何可以查看无线网络流量?win8查看无线网络流量的方法
- TCP/IP参考模型与OSI参考模型
- Tcp协议的三次握手
- Xcode7 网络请求报错:The resource could not be loaded because the App Transport Security policy requir
- Centos7 配置网络步奏详解