iOS9收到错误“发生了ssl错误,无法与服务器建立安全连接” [英] iOS9 getting error “an ssl error has occurred and a secure connection to the server cannot be made”
本文介绍了iOS9收到错误“发生了ssl错误,无法与服务器建立安全连接”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
自从我使用iOS 9升级现有项目以来,我一直收到错误:
Since I upgraded my existing project with iOS 9, I keep getting the error :
发生了SSL错误并建立了安全连接无法制作服务器。
An SSL error has occurred and a secure connection to the server cannot be made.
推荐答案
对于iOS9,Apple做出了一个激进的决定iOS 9,禁用来自iOS应用程序的所有不安全的HTTP流量,作为应用传输安全(ATS)。
For the iOS9, Apple made a radical decision with iOS 9, disabling all unsecured HTTP traffic from iOS apps, as a part of App Transport Security (ATS).
要简单地禁用ATS,您可以通过打开 Info.plist ,并添加以下行:
To simply disable ATS, you can follow this steps by open Info.plist, and add the following lines:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
这篇关于iOS9收到错误“发生了ssl错误,无法与服务器建立安全连接”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文