I have a WKWebView which should load the following url:
https://buchung.salonmeister.de/place/#offer-details-page?id=907599&venueId=301655
For me, the issue was caused by server trust check from the WKWebView.
To fix this I had to handle the challenge authentication callback and return a server trust credential.
Swift 4
func webView(_ webView: WKWebView,
didReceive challenge: URLAuthenticationChallenge,
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
{
if(challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust)
{
let cred = URLCredential(trust: challenge.protectionSpace.serverTrust!)
completionHandler(.useCredential, cred)
}
else
{
completionHandler(.performDefaultHandling, nil)
}
}