Package apple.foundation.protocol
Interface NSURLSessionDelegate
-
- All Known Subinterfaces:
AVAssetDownloadDelegate,NSURLSessionDataDelegate,NSURLSessionDownloadDelegate,NSURLSessionStreamDelegate,NSURLSessionTaskDelegate,NSURLSessionWebSocketDelegate
public interface NSURLSessionDelegateMessages related to the URL session as a whole
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceNSURLSessionDelegate.Block_URLSessionDidReceiveChallengeCompletionHandler
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidURLSessionDidBecomeInvalidWithError(NSURLSession session, NSError error)The last message a session receives.default voidURLSessionDidFinishEventsForBackgroundURLSession(NSURLSession session)If an application has received an -application:handleEventsForBackgroundURLSession:completionHandler: message, the session delegate will receive this message to indicate that all messages previously enqueued for this session have been delivered.default voidURLSessionDidReceiveChallengeCompletionHandler(NSURLSession session, NSURLAuthenticationChallenge challenge, NSURLSessionDelegate.Block_URLSessionDidReceiveChallengeCompletionHandler completionHandler)If implemented, when a connection level authentication challenge has occurred, this delegate will be given the opportunity to provide authentication credentials to the underlying connection.
-
-
-
Method Detail
-
URLSessionDidBecomeInvalidWithError
default void URLSessionDidBecomeInvalidWithError(NSURLSession session, NSError error)
The last message a session receives. A session will only become invalid because of a systemic error or when it has been explicitly invalidated, in which case the error parameter will be nil.
-
URLSessionDidReceiveChallengeCompletionHandler
default void URLSessionDidReceiveChallengeCompletionHandler(NSURLSession session, NSURLAuthenticationChallenge challenge, NSURLSessionDelegate.Block_URLSessionDidReceiveChallengeCompletionHandler completionHandler)
If implemented, when a connection level authentication challenge has occurred, this delegate will be given the opportunity to provide authentication credentials to the underlying connection. Some types of authentication will apply to more than one request on a given connection to a server (SSL Server Trust challenges). If this delegate message is not implemented, the behavior will be to use the default handling, which may involve user interaction.
-
URLSessionDidFinishEventsForBackgroundURLSession
default void URLSessionDidFinishEventsForBackgroundURLSession(NSURLSession session)
If an application has received an -application:handleEventsForBackgroundURLSession:completionHandler: message, the session delegate will receive this message to indicate that all messages previously enqueued for this session have been delivered. At this time it is safe to invoke the previously stored completion handler, or to begin any internal updates that will result in invoking the completion handler.
-
-