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
网友评论