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

今天用Xcode  创建新项目用到 URL 发送请求时,报下面的错: 
“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”

找查资料后发现,新特性要求App内访问网络请求,要采用 HTTPS 协议。

但是我获取的图片地址都是HTTP协议,经过百度和Google 的赞助最终找到以下解决办法:

在Info.plist中添加 App Transport Security Settings 类型 Dictionary ; 
在 NSAppTransportSecurity 下添加 NSAllowsArbitraryLoads 类型Boolean ,值设为 YES;

时间: 2024-10-06 06:49:59

Xcode 遇到 App Transport Security has blocked a cleartext HTTP 错误的相关文章

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

今天用Xcode 7 创建新项目用到 URL 发送请求时,报下面的错: “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” 找查资料后发现,新特性要求App内访问网络请求,要采用 HTTPS 协议. 但是我获取的

Xcode 7 App Transport Security has blocked a cleartext HTTP 报错解决办法

Xcode 7 创建新项目用到 UIWebView 发送请求时,报下面的错: “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” 找查资料后发现,新特性要求App内访问网络请求,要采用 HTTPS 协议. 但是现

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

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 except

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 URLWithString:@"http://easyread.ph.126.net/seRpubnsz_WwJGz7fexyeg==/7696583593456123398.jpg"]; NSData *data = [NSData dataWithContentsOfURL:url]; re

IOS开发系列(6)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.

在学习网络处理的过程,发现代码都没错,运行时却发生以下警告: 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. 问题分析: 应用程序采取了明文HTTP协议(http:/ /).而在iOS9 中,苹果引入了一项隐私

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 Settings”字段->添加“Allow Arbitrary Loads”字段,并将对应的value值设置为@“YES” IOS开发 App Transport Security has blocked a cleartext HTTP (http://) resource load since it

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 insecure. Temporary exceptions can be configured via your app‘s Info.plist file. 在iOS9 beta中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据. 解决方法: 在info.plist 加入k

iOS9中请求出现App Transport Security has blocked a cleartext HTTP (http://)

错误描述: 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. 在iOS9中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据. 解决方法: 在info.plist 加入key <k

App Transport Security has blocked a cleartext HTTP (http://) resource load

"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" // 报错,按照要求设置了之后,还是报这个错误.(快疯了) 删除了 info.plist 中的配置重新写了一遍,好了(真TMD神奇) 配置: 如果是H