Last active
January 26, 2021 03:08
-
-
Save tigi44/aad7e2c4372643c741daac24c24f8b1e to your computer and use it in GitHub Desktop.
wkwebview - ignore web auth (ssl..)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler | |
{ | |
NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengeUseCredential; | |
NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; | |
if (completionHandler) | |
{ | |
completionHandler(disposition, credential); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment