Xcode7禁用了明码的HTTP请求,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。会出现以下error:
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.
解决方法:应该在info.plist里添加如下字段:
<key>NSAppTransportSecurity</key><dict>
<key>NSAllowsArbitraryLoads</key>
<true/></dict>
即: