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.
刚刚更新了Xcode 7 和iOS9 在开发上遇到了上的这个错误信息 在网上查了一下.这个因为在iOS 9的时候 增加了一些安全机制.
我们可以在info.plist里把这个给开放了.
英文好的可以去看英文的网站.
点击打开链接 http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http
修正的方法有2个.
方法一:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourserver.com</key>
<dict>
<!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<!--Include to allow HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<!--Include to specify minimum TLS version-->
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>
方法二:比较懒的方法
<key>NSAppTransportSecurity</key>
<dict>
<!--Include to allow all connections (DANGER)-->
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>