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

错误: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” 
 
原因:因为在iOS9里,要求采用 HTTPS 协议。
 
解决方案:
在Info.plist中添加 NSAppTransportSecurity 类型 Dictionary ; 
在 NSAppTransportSecurity 下添加 NSAllowsArbitraryLoads 类型Boolean ,值设为 YES;

 

 
posted @ 2016-03-02 22:46  一斗才  阅读(146)  评论(0编辑  收藏  举报