Contents

connectionDidFinishDownloading(_:destinationURL:)

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

Declaration

func connectionDidFinishDownloading(_ connection: NSURLConnection, destinationURL: URL)

Parameters

  • connection:

    The URL connection object that downloaded the asset.

  • destinationURL:

    A file URL specifying a destination in the file system. For iOS applications, this is a location in the application sandbox.

Discussion

This method will be called once after a successful download. The file downloaded to destinationURL is guaranteed to exist there only for the duration of this method implementation; the delegate should copy or move the file to a more persistent and appropriate location.

See Also

Managing Downloads of URL Assets