O'Reilly logo

Mastering Swift 4 - Fourth Edition by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

URLSessionConfiguration

The URLSessionConfiguration class defines the behavior and policies to use when using the URLSession object to connect to a URL. When using the URLSession object, we usually create a URLSessionConfiguration instance first, because an instance of this class is required when we create an instance of the URLSession class.

The URLSessionConfiguration class defines three session types:

  • Default session configuration: This manages the upload and download tasks with default configurations
  • Ephemeral session configuration: This configuration behaves similarly to the default session configuration, except that it does not cache anything to disk
  • Background session configuration: This session allows for uploads and downloads to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required