美文网首页
iOS 9 网络适配

iOS 9 网络适配

作者: 胜胜哥哥 | 来源:发表于2015-11-04 17:44 被阅读0次

iOS 9采用https请求,运行旧工程或者未适配,会出现以下警告:

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.

解决办法:

1、在   Info.plist   ->   Open As   ->   Source Code

NSAppTransportSecurity

NSAllowsArbitraryLoads

iOS 9 网络适配

2、打开   Info.plist   添加key:NSAppTransportSecurity​

输入完成之后会自动变成:App Transport Security Settings​

再展开,添加key:Allow Arbitrary Loads   设置为:YES

 

相关文章

网友评论

      本文标题:iOS 9 网络适配

      本文链接:https://www.haomeiwen.com/subject/tvaqhttx.html