NSURLSession / NSURLConnection HTTP加载失败(kCFStreamErrorDomainSSL,-9802)Xamarin.Forms IOS

问题描述 投票:0回答:1

我开发了Web视图要导航到Web演示,URL是

https://demos.xretail.com

我编辑了info.plist

  <dict>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <true/>
  </dict>
  <key>NSAppTransportSecurity</key>
  <dict>
    <key>NSExceptionDomains</key>
    <dict>
      <key>www.the-domain-name.com</key>
      <dict>
        <key>NSExceptionMinimumTLSVersion</key>
        <string>TLSv1.0</string>
        <key>NSExceptionRequiresForwardSecrecy</key>
        <false/>
        <key>NSExceptionAllowsInsecureHTTPLoads</key>
        <true/>
        <key>NSIncludesSubdomains</key>
        <true/>
        <key> NSAllowsArbitraryLoadsInWebContent</key>
        <true/>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
      </dict>
    </dict>
  </dict>

我在app delegate中使用paybass证书,但它对我不起作用

  ServicePointManager
.ServerCertificateValidationCallback +=
(sender, cert, chain, sslPolicyErrors) => true;
ios ssl xamarin.forms xamarin.ios
1个回答
0
投票

你能尝试改变iOS Build设置吗?

  1. 更改HttpClient实现使用NSUrlSession
© www.soinside.com 2019 - 2024. All rights reserved.