nsurlsession/nsurlconnection http负载失败(KCFStreamErordomainssl



我开发了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>

我在应用程序委托中使用PayBass证书,但对我不起作用

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

您可以尝试更改iOS构建设置。

  1. 更改httpclient实现使用 nsurlsession

最新更新