私は、HTTP 基本認証を使用する Web サービスを使用していますNSURLConnection
。私のでは、 、
、および
NSURLConnectionDelegate
を実装しましたが、どれも呼び出されません。–[NSURLConnectionDelegate connection:canAuthenticateAgainstProtectionSpace:]
–[NSURLConnectionDelegate connection:didCancelAuthenticationChallenge:]
–[NSURLConnectionDelegate connection:didReceiveAuthenticationChallenge:]
と の両方を–[NSURLConnectionDelegate connectionShouldUseCredentialStorage:]
返すように実装しようとしましたが、効果はありませんでした。YES
NO
また、 myNSURLCredentialStorage
が空であることも確認しました。
最後に、–[NSURLConnectionDelegate connection:canAuthenticateAgainstProtectionSpace:]
、
–[NSURLConnectionDelegate connection:didCancelAuthenticationChallenge:]
、および
–[NSURLConnectionDelegate connection:didReceiveAuthenticationChallenge:]
を実装する代わりに を実装–[NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge:]
しましたが、どちらも呼び出されませんでした。
NSURLConnection
callNSURLConnectionDelegate
の認証コールバックを行うにはどうすればよいですか?