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 ...
随机推荐
- DotNetBar.MetroTilePanel 样式、加载数据、获取数据
描述下:MetroTilePanel包含子集ItemContainer 子集下面又包含子集MetroTileItem 目前我用到的就是这三层 因为需求所以整个模块全部由代码实现 1.ItemCon ...
- 关于SqlServer连接错误
以前用数据库好好的,今天突然就出现连接错误,贴出出错误消息 出现这种错误的原因:服务里面sqlserver服务没有打开. 解决方案 : 计算机右键,打开管理,找到服务,把服务里面的SQL Server ...
- C#基础笔记(第二十天)
1.复习属性:保护字段的构造函数:初始化对象初始化对象:给对象的每个属性去赋值什么时候会调用构造函数:当我们new的时候面向对象中需要注意的两个关键字this 1.代表当前类的对象 2.调用自己的构造 ...
- OpenResty 最佳实践 (1)
此文已由作者汤晓静授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. OpenResty 发展起源 OpenResty(也称为 ngx_openresty)是一个全功能的 Web ...
- “全栈2019”Java异常第二十二章:try-with-resources语句详解
难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java异 ...
- [agc006f] Blackout 神题
Description 给你一个NN行NN列的网格,第ii行第jj列的格子用(i,j)(i,j)表示 一开始的时候有MM个格子被涂成黑色,其他的格子都是白色,具体一点,涂成黑色的格子为(a1,b1 ...
- BZOJ 1922--大陆争霸(最短路)
1922: [Sdoi2010]大陆争霸 Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 2113 Solved: 947[Submit][Status ...
- [转] Foobar2000 DSP音效外挂元件-Part4
[转] Foobar2000 DSP音效外挂元件-Part4 在第1部分的文章里主要介绍了foobar2000预设的DSP音效调整,这些则示要介绍几个比较会用到的DSP外挂元件,在foobar2000 ...
- Java性能优化技巧及实战
关于Java代码的性能优化,是每个javaer都渴望掌握的本领,进而晋升为大牛的必经之路,但是对java的调优需要了解整个java的运行机制及底层调用细节,需要多看多读多写多试,并非一朝一夕之功.本文 ...
- app.module.ts说明
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; ...