Type Property


Returns a newly created default session configuration object.


class var `default`: URLSessionConfiguration { get }

Return Value

A new configuration object for managing upload and download tasks using the default options.


The default session configuration uses a persistent disk-based cache (except when the result is downloaded to a file) and stores credentials in the user’s keychain. It also stores cookies (by default) in the same shared cookie store as the NSURLConnection and NSURLDownload classes.

Modifying the returned session configuration object does not affect any configuration objects returned by future calls to this method, and does not change the default behavior for existing sessions. It is therefore always safe to use the returned object as a starting point for additional customization.

See Also

Creating a Session Configuration Object

class var ephemeral: URLSessionConfiguration

Returns a session configuration that uses no persistent storage for caches, cookies, or credentials.

class func background(withIdentifier: String)

Returns a session configuration object that allows HTTP and HTTPS uploads or downloads to be performed in the background.