I need to parse a xml file from a password protected URL I tried the following
NSURLCredential *credential = [NSURLCredential credentialWithUser:@\"admin\"
In my case the issue was caused by a firewall/proxy requiring a client certificate for all HTTPS calls. I resolved this issue by providing a NSURLProtocol subclass to handle authentication challenges and provide this certificate.
[NSURLProtocol registerClass:self];
//implement these methods
- (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
- (void)resolveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge withCredential:(NSURLCredential *)credential;