Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 错误:CFNetwork SSLHandshake失败(-9806)_Ios_Swift_Webview - Fatal编程技术网

Ios 错误:CFNetwork SSLHandshake失败(-9806)

Ios 错误:CFNetwork SSLHandshake失败(-9806),ios,swift,webview,Ios,Swift,Webview,我在WebView中添加了一个带有youtube视频的框架。它很好用 webView.loadHTMLString("<html><head><title>.</title><style>body,html,iframe{margin:0;padding:0;}</style></head><body><iframe width=\"" + String(describing: w) + "\"

我在WebView中添加了一个带有youtube视频的框架。它很好用

webView.loadHTMLString("<html><head><title>.</title><style>body,html,iframe{margin:0;padding:0;}</style></head><body><iframe width=\"" + String(describing: w) + "\" height=\"" + String(describing: h) + "\" src=\"" + livestream.Url + "?&playinline=1\" frameborder=\"0\" allowfullscreen></iframe></body></html>", baseURL: nil)
webView.loadHTMLString(.body,html,iframe{margin:0;padding:0;}),baseURL:nil)
然后我对livestream.com视频做了同样的操作。 我犯了以下错误:

  • CFNetwork SSLHandshake失败(-9806)
  • SURLSession/NSURLConnection HTTP加载失败 (kCFStreamErrorDomainSSL,-9806)
  • 收到内存警告
我还在Info.plist文件中添加了数据:

<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>          
        <key>livestream.com</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSExceptionMinimumTLSVersion</key>
            <string>TLSv1.1</string>
        </dict>
    </dict>
</dict>

NSAllowsArbitraryLoads
NSExceptionDomains
livestream.com
n包括多个域
N异常低安全Http负载
NSExceptionMinimumTLSVersion
TLSv1.1