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

来源:互联网 发布:浮雕设计软件 编辑:程序博客网 时间:2024/05/17 19:21

在IOS9获取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起要求使用https协议,如果要继续使用http协议,可以在info.plist文件中增加
<key>NSAppTransportSecurity<key>
<dict>
<key>NSAllowsArbitraryLoads<key>
<true/>
</dict>
或者直接
在info中添加App Transport Security Settings,type:Dictionary ,
并在其下添加Allow Arbitrary Loads,type:Boolean, value:YES

0 0
原创粉丝点击