Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let testURL = URL(string: "http://www.example.com")
- let loginProtectionSpace = URLProtectionSpace(host: (testURL?.host)!, port: 0, protocol: testURL?.scheme, realm: nil, authenticationMethod: NSURLAuthenticationMethodHTTPDigest)
- let credentialTest = URLCredential(user: "foo", password: "bar", persistence: .permanent)
- URLCredentialStorage.shared.setDefaultCredential(credentialTest, for: loginProtectionSpace)
- // Just trying to make sure that my credentialTest is really stored, but getting someCredentials = nil how so?
- let someCredentials = URLCredentialStorage.shared.credentials(for: loginProtectionSpace)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement