Instance Method

downloadTask(withResumeData:)

Creates a download task to resume a previously canceled or failed download.

Declaration

func downloadTask(withResumeData resumeData: Data) -> URLSessionDownloadTask

Parameters

resumeData

A data object that provides the data necessary to resume a download.

Return Value

The new session download task.

Discussion

After you create the task, you must start it by calling its resume() method.

This method is equivalent to the downloadTask(withResumeData:completionHandler:) with a nil completion handler. For detailed usage information, including ways to obtain a resume data object, see that method.