Xcode 7提示App Transport Security has blocked a cleartext HTTP (http://) resource load的解决办法

 
今天使用Xcode 7打开用Xcode 6开发的网络请求项目,Xcode 7 控制台提示如下: App TransportSecurity has blocked a cleartext HTTP (http://) resource load since it isinsecure. Temporary exceptions can be configured via your app's Info.plist file.

简而言之:ATS禁止了HTTP的明文传输,因为它不安全。可以修改Info.plist文件,让它临时允许明文传输。

解决办法:
在Info.plist文件中添加主Key值"NSAppTransportSecurity", Type为"Dictionary",

再添加次Key值"NSAllowsArbitraryLoads", Type 为"Boolean",“Value”为“YES”即可。

在info.plist中添加代码实现为

<key>NSAppTransportSecurity</key><dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/></dict>

注:Arbitrary 英[ˈɑ:bɪtrəri] 随意的,任性的,随心所欲的; 主观的,武断的;

修改info.plist文件中可视化操作:

Xcode 7提示App Transport Security has blocked a cleartext HTTP (http://) resource load的解决办法的更多相关文章

  1. 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中配置.除了配置允许上网的配置之外,还有另一项.

  2. App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.-解决办法

    运行环境:Xcode Version 7.3.1 (7D1014) 使用NSURL进行数据请求数据代码: -(NSData *)requestData{ NSURL *url = [NSURL URL ...

  3. 报错: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is ins

    环境:Xcode7.1.1 + iOS9.1 详细错误: App Transport Security has blocked a cleartext HTTP (http://) resource ...

  4. 无法下载图片 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

    刚学线程通信,提示: 2016-01-27 11:11:02.246 20-9 gcd3 communicationOfThread[5193:298643] App Transport Securi ...

  5. 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 ...

  6. App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.

    [摘要: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecur ...

  7. 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 ...

  8. 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 ...

  9. Xcode 7遇到 App Transport Security has blocked a cleartext HTTP 错误

    今天用Xcode 7 创建新项目用到 URL 发送请求时,报下面的错: “App Transport Security has blocked a cleartext HTTP (http://) r ...

随机推荐

  1. js 去除空格回车换行

    开发中遇到特殊需求,需要将空格回车换行替换成逗号 直接使用正则表达式解决: 变量.replace(/\s+/g,","); 如果想要去除则将后面逗号变成空就OK了.

  2. hdu 1011 Starship Troopers 经典的树形DP ****

    Starship Troopers Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Other ...

  3. lintcode 题目记录3

    Expression Expand  Word Break II Partition Equal Subset Sum  Expression Expand  字符串展开问题,按照[]前的数字展开字符 ...

  4. c语言结构体可以直接赋值

    结构体直接赋值的实现 下面是一个实例: #include <stdio.h> struct Foo { char a; int b; double c; }foo1, foo2; //de ...

  5. ueditor PHP版本使用方法

    1.ueditor是百度很好用的一款文本编辑器,第一次使用,在此记录使用方法. 2.从http://ueditor.baidu.com/website/download.html#ueditor下载e ...

  6. JavaScript对HTML字符转义与反转义(转码和解码)

    HTML的Encode(转码)和解码(Decode)在平时的开发中也是经常要处理的,在这里总结了使用javascript处理HTML的Encode(转码)和解码(Decode)的常用方式 一.用浏览器 ...

  7. sqlserver2008数据库文件降级为sqlserver2005文件

    直接分离附加是不行的. 操作步骤如下: 在sqlserver2008企业管理器中 右键xx数据库->任务->生成脚本 弹出框中勾选 为所选数据库中的所有对象编写脚本 下一步  修改如下图片 ...

  8. JsonCpp操作数组对象

    JsonCpp操作数组对象 概述 ​ Json格式数据中,除了简单的String类型和一些非String类型,也有像各种高级语言中的数组类型一般的数组对象,且Json数组在实际开发中使用频率也比较高, ...

  9. 沙盒 sandbox 简记随笔

    沙盒又称沙箱(sandbox),是一种按照  安全策略  限制  程序行为  的  执行环境. “沙盒”技术的实践运用流程是: 1. 让疑似病毒文件的可疑行为在虚拟的“沙盒”里充分运行,“沙盒”会记下 ...

  10. [转]Tomcat7基于Redis的Session共享

    转自:http://blog.csdn.net/catoop/article/details/48603891 目前,为了使web能适应大规模的访问,需要实现应用的集群部署.集群最有效的方案就是负载均 ...