Guest User

Untitled

a guest
Sep 4th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. func webView(_ webView: WKWebView, didReceive challenge:
  2. URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
  3. let user = "user"
  4. let password = "password"
  5. let credential = URLCredential(user: user, password: password, persistence: URLCredential.Persistence.forSession)
  6. completionHandler(URLSession.AuthChallengeDisposition.useCredential, credential)
  7.  
  8. }
Add Comment
Please, Sign In to add comment