Interface NSURLSessionDelegate

    • 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.