WKWebView does not load https URL?

前端 未结 6 776
予麋鹿
予麋鹿 2021-02-07 00:16

I have a WKWebView which should load the following url:

https://buchung.salonmeister.de/place/#offer-details-page?id=907599&venueId=301655

6条回答
  •  耶瑟儿~
    2021-02-07 01:10

    not sure if the same error reason, but the problem was the same for me under iOS9

    some domains couldn't be loaded

    turned out that the problem was in

    - (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler {
    

    and providing back

    completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, nil);
    

    where I should have returned

    completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
    

    I was using WRONG code from https://github.com/ShingoFukuyama/WKWebViewTips

提交回复
热议问题