Initializer

init(configuration:)

Creates a session with the specified session configuration.

Declaration

init(configuration: URLSessionConfiguration)

Parameters

configuration

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

See URLSessionConfiguration for more information.

Discussion

Calling this method is equivalent to calling init(configuration:delegate:delegateQueue:) with a nil delegate and queue.

See Also

Creating a Session

init(configuration: URLSessionConfiguration, delegate: URLSessionDelegate?, delegateQueue: OperationQueue?)

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

class URLSessionConfiguration

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

var configuration: URLSessionConfiguration

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