Class

URLSessionDownloadTask

An NSURLSessionDownloadTask is a concrete subclass of URLSessionTask. Most of the methods associated with this class are documented in URLSessionTask.

Overview

Download tasks directly write the server’s response data to a temporary file, providing your app with progress updates as data arrives from the server. When you use download tasks in background sessions, these downloads continue even when your app is suspended or is otherwise not running.

You can pause (cancel) download tasks and resume them later (assuming the server supports doing so). You can also resume downloads that failed because of network connectivity problems.

When you use download tasks:

Symbols

Canceling a Download

func cancel(byProducingResumeData: (Data?) -> Void)

Cancels a download and calls a callback with resume data for later use.

Relationships

Inherits From

Conforms To