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

标签 ios ssl xamarin.forms xamarin.ios

我开发了 Web view To Navigate to web demo,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>

我在应用程序委托(delegate)中使用了 paybass 证书,但它对我不起作用

  ServicePointManager
.ServerCertificateValidationCallback +=
(sender, cert, chain, sslPolicyErrors) => true;

最佳答案

您可以尝试更改 iOS build设置吗。

  1. 更改 HttpClient 实现使用 NSUrlSession

关于ios - NSURLSession/NSURLConnection HTTP 加载失败(kCFStreamErrorDomainSSL,-9802)Xamarin.Forms IOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55934114/

相关文章:

ios - 如何在完美框架中取消/删除使用服务器端 swift 重定向客户端

ruby - 在 Docker for Windows 上构建镜像时 gem 安装失败

node.js - 如何为我的 bluemix 应用程序强制实现 SSL?

c# - 如何在 Xamarin Forms 中维护 ListView 项的下载进度

button - Xamarin.Forms 按钮在触摸后将被禁用

c# - X 毫秒后触发一个 Action 开始

ios - 在选择时动画化 UICollectionViewCell 标签

ios - iOS 中的四位数密码输入/OTP 屏幕

iphone - 具有键盘按钮样式的 UIButton

tomcat - Apache tomcat 相互认证自签名证书 REST 服务