Xcode报错解决:
Xcode报错提示语:
[6270:534022] 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.
解决方案:
Xcode7以上版本,苹果官方为了安全性考虑,默认Xcode在运行时时无法联网的,需要手动添加设置联网代码:
具体步骤:
1.打开Xcode,鼠标选择info.plist文件
2.右键info.plist,选择"open As"->"Source Code"
3.添加联网代码
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
4.复制上面的几行代码,保存文档,运行即可