App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. your app's Info.plist file

Xcode7 使用NSURLSession发送HTTP请求的问题   

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.

貌似Xcode7禁用了明码的HTTP请求,应该在info.plist里添加什么字段,解决办法
编辑 info.plist,加入如下设置:

<plist>
<dict>
        ....
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
</dict>
</plist>
找不到可以看图:红色标注,在info.plist文件添加
posted @ 2015-11-10 23:40  爱知识_fei  阅读(200)  评论(0编辑  收藏  举报