xcode 7 swift webview https输出报告
xcode 7 swift,我为我的webview使用https,应用程序加载页面成功,但它说"2015-10-05 18:03:51.204 HKCateringApp[1326:45336] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)"
请帮忙解决它。在这里我的代码:xcode 7 swift webview https输出报告
let URL = NSURL(string: "https://www.ssls.com")
WebView.loadRequest(NSURLRequest(URL: URL!))
你要只是NSAllowsArbitraryLoads关键在你Info.plist文件添加到是在NSAppTransportSecurity字典。 iOS 9.0中的新东西,所以你必须这样做。
例如,
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
你能指导我怎么做吗?我是新来的使用Xcode和无法找到NSAppTransportSecurity – GPH
请参阅本教程 - > http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/|| http://i.stack.imgur.com/CnBlN.png –
你不会找到关键的NSAppTransportSecurity。您必须手动粘贴并输入,并将其值保存为YES。那就是它。 –
的可能的复制[CFNetwork的SSLHandshake失败的iOS 9](http://*.com/questions/30720813/cfnetwork-sslhandshake-failed-ios-9) – Moritz
你检查AppTransport安全性在info.plist中? –