Content cannot be displayed via basic authentication with WKWebView on iOS13.

We have been able to get contents via basic authentication with WKWebView on under iOS12.

But content cannot be got via basic authentication with WKWebView on iOS13.

We got following logs:

Error Domain=WebKitErrorDomain Code=102 "Frame Load Interrupted" UserInfo={_WKRecoveryAttempterErrorKey=<WKReloadFrameErrorRecoveryAttempter: 0x2814d0680>, NSErrorFailingURLStringKey=https://***/yyy.html, NSErrorFailingURLKey=https://***/yyy.html, NSLocalizedDescription=Frame Load Interrupted}


Is there any information about this event?


os: iOS13+

xcode: 11

Replies

I have this same problem. Can you find any solution?

I have found a solution

I used function loadData

- (nullable WKNavigation *)loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0));

[self.webView loadData:[NSData dataWithContentsOfURL:self.URL] MIMEType:@"application/pdf" characterEncodingName:@"UTF-8" baseURL:self.URL];

  • Great to see an Objective-C code answer in 2020.

Add a Comment