错误提示:
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.
我用的Xcode版本是:
以前的解决方法:
1.在info.plist 添加
2.在info.plist 加入key
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
现在就是选择关键字变化了,由“NSAppTransportSecurity”和“NSAllowsArbitraryLoads”,变为“App Transport Security Settings”和“Allow Arbitrary Loads”。我这个版本,是没有“NSAppTransportSecurity”可以选择的。方法二没有变化
方法一.在info.plist 添加下图红色框内容(记得Boolen 要选为 YES哦)
方法二:亲测是和以前一样。
我是菜鸟,刚开始不知道变化,知道之后作为记录记下。我也没搞懂根本原因是什么,请大神们赐教。