Xcode7 网络请求报错
xcode7 网络报错:
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
。 - 在
NSAppTransportSecurity
下添加NSAllowsArbitraryLoads
类型Boolean
,值设为YES
Xcode7 网络请求报错的更多相关文章
- 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 ...
- 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 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.1 网络请求报错
The resource could not be loaded because the App Transport Security policy reguir 原因:iOS9引入了新特性App T ...
- 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 ...
- JS请求报错:Unexpected token T in JSON at position 0
<?php /* 最近做一个ajax validate表单验证提交的代码,在ajax提交的时候 JS请求报错:Unexpected token T in JSON at position 0 描 ...
随机推荐
- MAX16054
MAX16054是带有单个开关去抖以及内部闭锁电路的按键通/断控制器,可接受机械开关产生的嘈杂输入,并经过一个有工厂设置的延迟时间后产生干净的数字锁存输出. 开关通.断期间,MAX16054无接触抖动 ...
- [iOS基础控件 - 5.2] 查看大图、缩放图片代码(UIScrollView制作)
原图: 900 x 1305 拖曳滚动: 缩放: 主要代码: // // ViewController.m // ImageZoom // // Created by ...
- Objective-C Runtime 运行时之三:方法与消息
基础数据类型 SEL SEL又叫选择器,是表示一个方法的selector的指针,其定义如下: typedef struct objc_selector *SEL; objc_selector结构体的详 ...
- Android 画图类View与SurfaceView之学习
在开发游戏开发中,android相应的提供了几个重要的模块: 1.显示界面的视图: Android 提供 View 和 SurfaceView 2.控制游戏整体结构: android 提供 Acti ...
- poj 4045 (树形DP)
先选一点为根节点找出所有父节点i到下面所有点距离和dp[i],该父节点下面有多少个点Node[i]. 然后求出所有节点的所有非子节点到该点的距离dp1[v]+=(dp1[u]+(dp[u]-dp[v] ...
- Android studio中出现非法字符时的部分解决方法
我将原来在Eclipse中开发的工程搬到了Android studio上来,在运行,编译程序的过程中出现了错误.提示存在非法字符. 后来发现是由于程序代码中有中文字符的出现,问题就出在对中文支持的UT ...
- 一个实际的sonar代码检查的配置文件
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...
- 在Image控件中绘制文字
//Canvas 在Image控件中绘制文字 procedure TForm1.Button1Click(Sender: TObject);begin image1.Canvas.Font.Size ...
- 文件TEXTBOX
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- [GIF] Parenting in GIF Loop Coder
In this lesson, we look at how you can build up complex animations by assigning one shape as the par ...