标签:
我们在Xcode中进行解析时,有时候会出现奔溃,检查打印日志显示:
2016-03-21 09:38:02.815 TriS[3385:43012] App Transport Securityhas blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app‘s Info.plist file.
这是因为iOS 9.0之后不再支持http协议,而支持https(安全的http),此时我们需要解决这个问题,只需要在info.plist中进行处理,便可解决:
1.打开info.plist的源码(Open As -> Source Code),在XML中添加代码:
1 <key>NSAppTransportSecurity</key> 2 <dict> 3 <key>NSAllowsArbitraryLoads</key> 4 <true/> 5 </dict>
2.或者,直接在info.plist中进行添加
标签:
原文地址:http://www.cnblogs.com/kriskee/p/5300701.html