swift--Xcode7 使用Alamofire框架发送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.

//这是ios 9更新后,苹果将http请求换为了https请求了,解决方案如下:

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

 

posted @ 2015-11-27 11:20  brance  阅读(501)  评论(0编辑  收藏  举报