Protocol

URLSession​Delegate

The NSURLSession​Delegate protocol describes the methods that URLSession objects call on their delegates to handle session-level events. In addition to the methods defined in this protocol, most delegates should also implement some or all of the methods in the URLSession​Task​Delegate, URLSession​Data​Delegate, and URLSession​Download​Delegate protocols to handle task-level events.

Overview

Symbols

Delegate Methods

func url​Session(URLSession, did​Become​Invalid​With​Error:​ Error?)

Tells the URL session that the session has been invalidated.

func url​Session(URLSession, did​Receive:​ URLAuthentication​Challenge, completion​Handler:​ (URLSession.Auth​Challenge​Disposition, URLCredential?) -> Void)

Requests credentials from the delegate in response to a session-level authentication request from the remote server.

func url​Session​Did​Finish​Events(for​Background​URLSession:​ URLSession)

Tells the delegate that all messages enqueued for a session have been delivered.

Constants

URLSession.Auth​Challenge​Disposition

Constants passed by session or task delegates to the provided continuation block in response to an authentication challenge.

Relationships

Inherits From