使用xcode7编译的app,如果使用了http协议,那么会出现如下警告,导致请求失败。
那是因为:
在iOS9 beta1中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。
解决办法:
在info.plist中添加
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
使用xcode7编译的app,如果使用了http协议,那么会出现如下警告,导致请求失败。
那是因为:
在iOS9 beta1中,苹果将原http协议改成了https协议,使用 TLS1.2 SSL加密请求数据。
解决办法:
在info.plist中添加
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>