kCFErrorDomainCFNetwork Code=310 "(null)"
<p>Using a WKWebView, connect to a site that, upon user selection, will redirect to another site. The following error comes up after <code>didReceiveServerRedirectForProvisionNavigation</code>:</p>

<pre><code>Error Domain=kCFErrorDomainCFNetwork Code=310 "(null)" UserInfo={_WKRecoveryAttempterErrorKey=&lt;WKReloadFrameErrorRecoveryAttempter: 0x60800002a8e0&gt;, _kCFStreamErrorCodeKey=-2096, _kCFStreamErrorDomainKey=4}
</code></pre>

<p>There's nothing real special happening here. I'm just trying to mimic Safari.</p>

<p>I've also overridden <code>didReceive challenge</code> with the following:</p>

<pre><code>func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -&gt;     Void) {
    var cred: URLCredential?
    if let trust = challenge.protectionSpace.serverTrust {
        cred = URLCredential(trust: trust)
    } else {
        //creds are hardcoded just to try to get the thing working.
        cred = URLCredential(user: "hardcodedusername", password: "hardcodedpassword", persistence: .permanent)
    }
    completionHandler(.useCredential, cred)
}
</code></pre>

<p>It's worth noting that <code>didReceive challenge</code> isn't called when redirecting.</p>

<p>My assumption is that the site that I'm trying to redirect to has an old encryption protocol (TLS 1.0) and iOS isn't allowing the redirect. The site works fine in Safari on the iPhone. I also have ATS arbitrary loads set. This is Objective-C to Swift conversion, and the Objective-C version has no problem with this (using UIWebView, which was my original implementation before trying WKWebView... same error).</p>

<p>To be clear, this is a QA environment. I don't care if the cert is good or bad. If I can avoid any security requirement for this environment that would be great, but it seems like the arbitrary load setting doesn't do anything for me.</p>

<p>What am I missing?</p>