Xcode7 网络请求报错:The resource could not be loaded because the App Transport Security policy...
2016-03-06 23:53
363 查看
今天在学习IOS的WebView控件时发现WebView加载URL报错,菜鸟的我只能上Google一查究竟。
错误信息:
最后网上查到在IOS9的时候引入了App
Transport Security (ATS)。
详细文档参考:https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-DontLinkElementID_13
解决办法:
第一步:在Info.plist中添加NSAppTransportSecurity类型Dictionary。
第二步:在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值为YES。
错误信息:
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
最后网上查到在IOS9的时候引入了App
Transport Security (ATS)。
详细文档参考:https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-DontLinkElementID_13
解决办法:
第一步:在Info.plist中添加NSAppTransportSecurity类型Dictionary。
第二步:在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值为YES。
相关文章推荐
- HTTP无状态协议分析与Cookie的关系
- Windows开启网络对时方法
- Linux下网络流量实时监控工具 大全
- springMVC前端请求找不到资源路径(HTTP Status 404)问题
- 【网络流】poj1087
- 网络多线程(pthread , NSThread,GCD ,NSOperation)
- Http 请求
- AsyncHttpClient
- httpurlconnection
- okhttp
- linux网络编程 第18章
- Node建立HTTP服务器
- 深度学习框架大战正在进行,谁将夺取“深度学习工业标准”的荣耀?
- 最小割集与残余网络
- 笔记-网络基础
- HTTP协议详解
- Java---Socket编程UDP/TCP
- TCP协议下 Linux Server开发(1)-Reactor Proactor
- TCP协议中的三次握手和四次挥手
- VMware虚拟机网络设置――三种方式详解