NSURLSession/NSURLConnection HTTP加载失败(kCFStreamErrorDomainSSL,-9801) [英] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)
问题描述
因此,我尝试了当我搜索此问题时出现的解决方案中提到的修复程序,但是在Visual Studio上,我的iOS Web视图项目仍然遇到这些问题. android版本可以正常工作,但iOS无法正确加载网页.
主要尝试了以下修复程序: NSURLSession/NSURLConnection HTTP加载失败(kCFStreamErrorDomainSSL,-9802) >
我已将此添加到我的Info.plist文件中:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>site.co.za</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</dict>
我们的网站不安全,但是有什么办法可以绕过它,以便像Android上一样正确地加载移动网站?
只需在info.plist中添加以下Dict:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
So I have tried the fixes mentioned in the solutions that come up when I search for this issue but on Visual Studio I still get these issues for my iOS web view project. The android version works fine, but iOS does not load the web page properly.
Tried these fixes mainly: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
I've added this to my Info.plist file:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>site.co.za</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</dict>
Our site isn't secure but is there any way that I can bypass this so that I can load the mobile site properly like it does on Android?
Just Add following Dict in info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
这篇关于NSURLSession/NSURLConnection HTTP加载失败(kCFStreamErrorDomainSSL,-9801)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!