Class

NSURLDownload

An object that downloads a resource asynchronously and saves the data to a file.

Declaration

@interface NSURLDownload : NSObject

Overview

The interface for NSURLDownload provides methods to initialize a download, set the destination path and cancel loading the request.

The delegate object assigned to each instance of this class should implement the methods defined by the NSURLDownloadDelegate protocol. These methods provide the delegate with the current status of in-progress asynchronous downloads and allow the delegate to customize the URL loading process. These delegate methods are called on the thread that started the asynchronous load operation for the associated NSURLDownload object.

Topics

Creating and configuring a download instance

- initWithRequest:delegate:

Returns an initialized URL download for a URL request and begins to download the data for the request.

Deprecated
- setDestination:allowOverwrite:

Sets the destination path of the downloaded file.

Resuming partial downloads

+ canResumeDownloadDecodedWithEncodingMIMEType:

Returns whether a URL download object can resume a download that was decoded with the specified MIME type.

- initWithResumeData:delegate:path:

Returns an initialized NSURLDownload object that will resume downloading the specified data to the specified file and begins the download.

Deprecated
resumeData

Returns the resume data for a download that is not yet complete.

deletesFileUponFailure

Returns whether the receiver deletes partially downloaded files when a download stops prematurely.

Canceling a download

- cancel

Cancels the receiver’s download and deletes the downloaded file.

Getting download properties

request

Returns the request that initiated the receiver’s download.

deletesFileUponFailure

Returns whether the receiver deletes partially downloaded files when a download stops prematurely.

Relationships

Inherits From

See Also

URL Download

NSURLDownloadDelegate

A protocol that URL download delegates implement to interact with a URL download request.