Type Method

sessionWithConfiguration:delegate:delegateQueue:

Creates a session with the specified session configuration, delegate, and operation queue.

Declaration

+ (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration delegate:(id<NSURLSessionDelegate>)delegate delegateQueue:(NSOperationQueue *)queue;

Parameters

configuration

A configuration object that specifies certain behaviors, such as caching policies, timeouts, proxies, pipelining, TLS versions to support, cookie policies, and credential storage.

See NSURLSessionConfiguration for more information.

delegate

A session delegate object that handles requests for authentication and other session-related events.

This delegate object is responsible for handling authentication challenges, for making caching decisions, and for handling other session-related events. If nil, the class should be used only with methods that take completion handlers.

queue

An operation queue for scheduling the delegate calls and completion handlers. The queue should be a serial queue, in order to ensure the correct ordering of callbacks. If nil, the session creates a serial operation queue for performing all delegate method calls and completion handler calls.

See Also

Creating a Session

+ sessionWithConfiguration:

Creates a session with the specified session configuration.

NSURLSessionConfiguration

A configuration object that defines behavior and policies for a URL session.

configuration

A copy of the configuration object for this session.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software