iOS-App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure

使用AFN进行GET请求时控制台打印
Application 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.
解决方法:
在plist源文件中加入代码:

 <key>NSAppTransportSecurity</key>
    <dict>
        <!--Include to allow all connections (DANGER)-->
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

图示:
iOS-App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure_第1张图片

你可能感兴趣的:(ios,控制台,bug收集)