今天下载Xcode7试了下,运行项目时报上面的错误,网上查了下原来iOS9引入了新特性App Transport Security (ATS)。详情:App Transport Security (ATS)新特性要求App内访问的网络必须使用HTTPS协议。但是现在公司的项目使用的是HTTP协议,使用私有加密方式保证数据安全。现在也不能马上改成HTTPS协议传输。

解决方法:

  1. 在Info.plist中添加NSAppTransportSecurity类型Dictionary
  2. NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

IOS9网络请求报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.的更多相关文章

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

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

  3. 网络请求报错: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文 ...

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

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

  6. 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,添加该属性,再添 ...

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

  8. 网络请求出错:The resource could not be loaded because the App Transport

    Google后查证,iOS9引入了新特性App Transport Security (ATS).详情:App Transport Security (ATS) 新特性要求App内访问的网络必须使用H ...

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

随机推荐

  1. JQuery中checkbox选择器

    今天我们讲的是如何选择HTML网页中CheckBox选择器 如下图,是几个checkbox <input type='checkbox'checked="checked"/& ...

  2. maven多模块启动required a bean of type com.xxx.xxx.service that could not be found.

    Description: Field testService in com.xxx.xxx.api.controller.TestController required a bean of type ...

  3. leetcode 罗马数字转整数

    罗马数字包含以下七种字符:I,V,X,L,C,D 和M. 字符 数值 I 1 V 5 X 10 L 50 C 100 D 500 M 1000 例如, 罗马数字 2 写做II ,即为两个并列的 1.1 ...

  4. python网络编程--操作系统介绍

    1.操作系统介绍 操作系统位于计算机硬件与应用软件之间,本质也是一个软件.操作系统由操作系统的内核(运行于内核态,管理硬件资源)以及系统调用(运行于用户态,为应用程序员写的应用程序提供系统调用接口)两 ...

  5. samba服务器的安装与配置(之前是因为没有把共享文件权限放开!)(windows7和centOS6)

    注:centOS6跟centOS7安装方法不一样哦.以下是centOS6的安装过程. 安装:yum -y install samba 启动:/etc/init.d/smb start 设置开机启动:c ...

  6. 【Quartz】基本原理

    1 核心概念 1.1    核心元素 (1)Scheduler 任务调度器,是Quartz框架的核心,负责管理其他组件. (2)Trigger 触发器,用于定义任务调度的时间规则,有SimpleTri ...

  7. 48.rocketMQ

    一.简介 RocketMQ是阿里旗下的一款产品,分为开源版本和非开源版本.相比于ActiveMQ,RocketMQ支持顺序消费.事务机制.失败重试机制.消息可查询.消息订阅.较强的水平扩展能力.亿级堆 ...

  8. 编程开发之--java多线程学习总结(4)

    3.使用锁机制lock,unlock package com.lfy.ThreadsSynchronize; import java.util.concurrent.locks.Lock; impor ...

  9. k-近邻算法 python实现

    必要的注释已经写在code里面了: import operator from numpy import* def init(): grp=array([[1.0,1.1],[1.0,1.0],[0,0 ...

  10. Python基础部分的疑惑解析——运算符和数据类型(5)

    运算符 最后得到数值的: 算数运算符 赋值运算符 最后得到布尔值的: 成员运算符:in   not in 逻辑运算符    and   or   没有优先级就是按顺序执行 比较运算符 数据类型 1.整 ...