Protocol

NSURLConnectionDownloadDelegate

The NSURLConnectionDownloadDelegate protocol describes methods that should be implemented by the delegate of instances of NSURLConnection created using Newsstand Kit’s download(with:) method. The methods in this protocol provide progress information about the download of a URL asset and, when downloading concludes, provide a file URL where the downloaded file can be accessed.

Overview

In addition to the methods described in this protocol, an NSURLConnection delegate should also implement the methods described in the NSURLConnectionDelegate protocol.

Symbols

Managing Downloads of URL Assets

func connection(NSURLConnection, didWriteData: Int64, totalBytesWritten: Int64, expectedTotalBytes: Int64)

Sent to the delegate to deliver progress information for a download of a URL asset to a destination file.

func connectionDidResumeDownloading(NSURLConnection, totalBytesWritten: Int64, expectedTotalBytes: Int64)

Sent to the delegate when an URL connection resumes downloading a URL asset that was earlier suspended.

func connectionDidFinishDownloading(NSURLConnection, destinationURL: URL)
Required.

Sent to the delegate when the URL connection has successfully downloaded the URL asset to a destination file.

Relationships