Xcode7.1 网络请求报错
The resource could not be loaded because the App Transport Security policy reguir
原因:iOS9引入了新特性App Transport Security (ATS);
新特性要求App内访问的网络必须使用HTTPS协议;
但是现在大部分公司的项目使用的是HTTP协议,使用私有加密方式保证数据安全,也不能马上改成HTTPS协议传输;
- 在Info.plist中添加
NSAppTransportSecurity类型Dictionary。9M%SMUNW~M3.jpg)
- 在
NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES
如下图:

Xcode7.1 网络请求报错的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- Xcode7 网络请求报错
xcode7 网络报错: The resource could not be loaded because the App Transport Security policy reguir 原因:iO ...
- DefaultHttpClient 在oppo A57手机上网络请求报错
使用的库是xutils2.6.14,oppo A57 上调试的时候,请求接口时报错,但是其他手机都正常: com.lidroid.xutils.exception.HttpException: jav ...
- 网络请求报错: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文 ...
- Xcode7 创建HTTP请求报错
最近在Xcode 7中向服务器发送请求访问JSON数据时, 控制台打印了以下错误信息: Application Transport Security has blocked a cleartext H ...
- 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 (A ...
- Android版本28使用http请求报错not permitted by network security policy
Android版本28使用http请求报错not permitted by network security policy android模拟器调试登录的时候报错 CLEARTEXT communic ...
随机推荐
- 学习笔记:Vue——混入
前言: 到现在用Vue做了不少项目了,用到的都是初阶的功能,很多高阶能力都没有用到.仅用初级阶段也能做项目,甚至是复杂项目,可见vue之强大,果然是渐进式开发方式. 但是本着虚心学习的态度,还是要抽空 ...
- PHP与Linux进程间的通信
进程间通信预计是公司考察应届毕业生的必考点(嵌入式行业).当然非常多公司考的是算法. 不查阅资料,我脑子里能想到的 [1] 管道, (有名.无名) [2] 父子进程 [3] System V (消息队 ...
- poj 3071 Football(线段树+概率)
Football Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2801 Accepted: 1428 Descript ...
- 从零开始使用git第一篇:下载安装配置
从零开始使用git 第一篇:下载安装配置 第一篇:从零开始使用git第一篇:下载安装配置 第二篇:从零开始使用git第二篇:git实践操作 第三篇:从零开始使用git第三篇:git撤销操作.分支操作和 ...
- 【BZOJ 3172】单词
[链接]h在这里写链接 [题意] 给你n个单词; 这n个单词组成了一篇文章; 问你每个单词在这篇文章中出现了多少次. 其中每个单词之间用一个逗号隔开->组成一篇文 ...
- Spring Boot Freemarker特别篇之contextPath【从零开始学Spring Boot】(转)
需求缘起:有人在群里@我:请教群主大神一个问题,spring boot + freemarker 怎么获取contextPath 头疼死我了,网上没一个靠谱的 .我就看看之前博客中的 [Spring ...
- [NodeJS] Use Now alias for custom sub-domains
Now is a great way to deploy your node application, but the generated URLs aren't memorable or easil ...
- php 发送QQ邮箱邮件
这是我的源码比较简陋 https://www.lanzous.com/i2l7h8f 感谢 https://www.cnblogs.com/woider/p/6980456.html 下载phpmai ...
- [Angular] Alternative Themes - Learn the Host-Context Selector
To add alernative theme, we can use :host-context() selector from Angular. //au-fa-input-red-theme.c ...
- error C2220: warning treated as error - no 'object' file generated warning C4819: The file contains a character that cannot be represented in the current code page (936).
用Visual Studio2015 编译时,遇到如下编译错误: error C2220: warning treated as error - no 'object' file generated ...