Morning
I was working on creating an iOS application that uses stored credentials in NSURLCredentialStorage
for a specific security space. Now I realized that I am using proposedCredential
to retrieve the stored credentials.
My problem is that it returns null
, and I can not find any good explanation of what the proposedCredential
actually does and why it does not return what I think it should.
This is what I do:
First, I define NSURLProtectionSpace
, give the credentials, and save them to NSURLCredentialStorage
. I have already verified that this is done before I refer to the proposedCredential
and that the credentials that I pass are correct.
NSURLProtectionSpace *protectionSpaceOne = [[NSURLProtectionSpace alloc] initWithHost:xyz port: 80 protocol:NSURLProtectionSpaceHTTP realm:nil authenticationMethod:NSURLAuthenticationMethodDefault];
Can someone tell me what the proposedCredential
actually does, what it compares together to find out if there are credentials that it needs to pass, and what is it that I may be missing in the code?
For reference, I read an Apple document, specifically this , this and this
All help would be appreciated.
Hrafn source share