iOS 最新https遇到的问题

来源:互联网 发布:指纹识别算法 源代码 编辑:程序博客网 时间:2024/06/05 21:02

最近把以前的老项目打开会出现一个错误: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.


解决办法只需要在-Info.plist 加上

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

即可


0 0