【问题标题】:Cordova IOS =>' Failed to load resource: An SSL error has occurred'Cordova IOS =>'未能加载资源:发生 SSL 错误'
【发布时间】:2016-08-05 09:32:26
【问题描述】:

我正在与 Visual Studio Cordova 合作,我们嵌入了一个 Iframe。在 android 上它工作正常,但在 Ios (9+) 上:

加载资源失败:发生 SSL 错误并且安全 无法连接到“服务器”。

我读过其他线程建议更改 NSAppTransportSecurity。我已经通过Transport Security Plugin 完成了。

<dict>

          <key>NSAppTransportSecurity</key>
          <dict>
            <key>NSExceptionDomains</key>
            <dict>
              <key>mywebsite.com</key>
              <dict>
                <!--Include to allow subdomains-->
                <key>NSIncludesSubdomains</key>
                <true/>
                <!--Include to allow HTTP requests-->
                <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <!--Include to specify minimum TLS version-->
                <key>NSTemporaryExceptionMinimumTLSVersion</key>
                <string>TLSv1.1</string>
              </dict>
            </dict>
          </dict>
        </dict>

我已更改 CSP:

 <meta http-equiv="Content-Security-Policy"
        content="default-src * gap: ;
                   style-src 'self' 'unsafe-inline' 'unsafe-eval'; 
                   script-src 'self' 'unsafe-inline' 'unsafe-eval';
                    'child-src'*;
                    'frame-src':*;      
        " />

我仍然收到此错误。有什么帮助吗?

【问题讨论】:

    标签: ios cordova ssl taco


    【解决方案1】:

    实际上它来自嵌入的 iframe。 它使用 sha-1 签名进行认证,Apple 不允许此签名。所以我正在更改签名。

    【讨论】:

      猜你喜欢
      • 2017-01-22
      • 2017-08-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-23
      • 1970-01-01
      • 2015-10-24
      相关资源
      最近更新 更多