添加以下行:
completionHandler(NSURLSessionAuthChallengeDisposition.UseCredential, credential)
at the end of didReceiveAuthenticationChallenge
solved the problem.
在Swift中使用WKWebView进行身份验证
添加以下行:
completionHandler(NSURLSessionAuthChallengeDisposition.UseCredential, credential)
at the end of didReceiveAuthenticationChallenge
solved the problem.