macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

connection:didReceiveAuthenticationChallenge:

認証しなければいけないときに呼び出されます
-(void)connection:(NSURLConnection *)connection:
                    didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge:

解説

認証しなければいけないときに呼び出されます。

返り値

( void )

なし

引数

( NSURLConnection * )connection
( NSURLAuthenticationChallenge * )challenge

クラス

NSURLConnection

Instance Methods

使用可能

10.2.7(10.2+safari)

参照

-cancelAuthenticationChallenge:
-continueWithoutCredentialForAuthenticationChallenge:
-useCredential:forAuthenticationChallenge:

例文

//認証しなければいけないときに呼び出されます。
-(void)connection:(NSURLConnection*)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
NSLog(@"didReceiveAuthenticationChallenge");
}