【iOS】App Transport Security
iOS9中新增App Transport Security(简称ATS)特性, 主要使到原来请求的时候用到的HTTP,都转向TLS1.2协议进行传输。这也意味着所有的HTTP协议都强制使用了HTTPS协议进行传输。
错误信息如下:
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.
解决方法:
1. 在 Filter 中搜索 Info.plist,选择 Info.plist 进行编辑,如图所示:
2. 按照上面提到的方式添加信息,正确的修改会看到下图这个样子,注意类型 NSAppTransportSecurity 为 Dictionary,NSAllowsArbitraryLoads 为 Boolean, 如下所示:
3. 注意⚠️,单元测试下面也有一个Info.plist,修改那个文件是没有作用的!
PS: 刚开始添加后可能会没效果,后来又删除重试了几次才行。
参考:
https://segmentfault.com/a/1190000002933776
http://my.oschina.net/vimfung/blog/494687
【iOS】App Transport Security的更多相关文章
- IOS开发 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.
xcode自7后不再使用http,而是使用https请求,但目前很多网络请求还只是以http请求,我们可以这样解决 info.plist->添加@“App Transport Security ...
- 【iOS】app的生命周期
对于iOS应用程序,关键的是要知道你的应用程序是否正在前台或后台运行.由于系统资源在iOS设备上较为有限,一个应用程序必须在后台与前台有不同的行为.操作系统也会限制你的应用程序在后台的运行,以提高电池 ...
- iOS App 不支持http协议 App Transport Security has blocked a cleartext HTTP (http://)
目前iOS已经不支持http协议了,不过可以通过info.plist设置允许 App Transport Security has blocked a cleartext HTTP (http://) ...
- iOS: iOS9 beta 请求出现App Transport Security has blocked a cleartext HTTP (http://)
错误描述: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecu ...
- iOS使用webView 加载网页,在模拟器中没有问题,而真机却白屏了。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 f
还在info.plist中配置.除了配置允许上网的配置之外,还有另一项.
- iOS App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.
You can easily add it to the plist using the GUI: On the last line add the + Enter the name of the g ...
- 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
ios进行http请求,会出现这个问题: App Transport Security has blocked a cleartext HTTP (http://) resource load sin ...
- 【iOS】在Swift中使用JSONModel
前言 首先所有的Model还是使用oc来写——看到这一句是不是想关网页了- - #,在swift里面直接写一直报错所以就将就用oc来写了,这里主要是分享一下搭配Alamofire使用的经验. 声明 欢 ...
- App Transport Security has blocked a cleartext HTTP (http://)
使用SDWebImage加载“http://”开头的图片报错,错误如下: App Transport Security has blocked a cleartext HTTP (http://) r ...
随机推荐
- Codeforces Round #564 (Div. 2)B
B. Nauuo and Chess 题目链接:http://codeforces.com/contest/1173/problem/B 题目 Nauuo is a girl who loves pl ...
- 前端页面统计beacon调研
目录 为什么使用beacon beacon特性 beacon 示例 参考资料 主要用于测试html的新特性beacon,使用beacon向后端发送请求,代替xhr或jsonp, 好处是支持页面unlo ...
- CentOS7.3安装JIRA7.10
准备工作:下载相关安装包,上传到服务器/opt/apps目录下 链接:https://pan.baidu.com/s/15Y5Y3X6AX2ZokWkZKcRrQQ 密码:q0lw 1.安装数据库 y ...
- ECS通过mail发送邮件
发送邮件报错,因为新购实例默认对外访问25端口封禁状态,建议使用加密465端口 1.配置mailx [root@wiki ~]# yum install -y mailx ##yum安装完mailx之 ...
- redis整合springboot的helloworld
引入依赖 compile 'org.springframework.boot:spring-boot-starter-data-redis' 使用redis有两种方法 1.Jedis Jedis je ...
- 大规模SDN云计算数据中心组网的架构设计
本文首先分析了在大规模SDN数据中心组网中遇到的问题.一方面Underlay底层组网规模受限于设备实际的转发能力和端口密度,单一Spine-leaf的Fabric架构无法满足大规模组网的需求:另一方面 ...
- 如何搭建一个vue项目(完整步骤)
参考资料 一.安装node环境 1.下载地址为:https://nodejs.org/en/ 2.检查是否安装成功:如果输出版本号,说明我们安装node环境成功 3.为了提高我们的效率,可以使用淘宝的 ...
- 深入理解C#的装箱和拆箱
个人理解(本质): 封箱是把值类型转换为引用类型 拆箱是把引用类型转换为值类型 封箱是把值类型转换为System.Object类型,或者转换为由值类型实现的接口类型: 例如: struct Mystr ...
- Python Day_3
--人生苦短,我用Python 在我的第一天接触Python,我的小甲鱼老师给我带来的不是HelloWord,是一个小游戏,详情看Python Day_1 在我们这个游戏基础上,我在后面的课后练习,自 ...
- jquery对下拉框的操作
jQuery对下拉框的操作 /获取第一个option的值 $('#test option:first').val(); //最后一个option的值 $('#test option:last').v ...