iOS 9 网络适配

2015-11-04  本文已影响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

 

上一篇 下一篇

猜你喜欢

热点阅读