Contents

aggregateAssetDownloadTask(with:mediaSelections:assetTitle:assetArtworkData:options:)

Creates a download task to download the asset and media selections.

Declaration

func aggregateAssetDownloadTask(with URLAsset: AVURLAsset, mediaSelections: [AVMediaSelection], assetTitle title: String, assetArtworkData artworkData: Data?, options: [String : Any]? = nil) -> AVAggregateAssetDownloadTask?

Parameters

  • URLAsset:

    The asset to download to the local device.

  • mediaSelections:

    An array of media selections to download.

  • title:

    A human readable title for this asset in the user’s preferred language. The system displays this value in the usage pane of the Settings app.

  • artworkData:

    Optional artwork data for this asset. The system displays the image in the usage pane of the Settings app.

  • options:

    Configures custom behavior on the download task.

Return Value

An aggregate asset download task.

Discussion

This method may return nil if you call it on an invalidated session.

Topics

Download option keys

See Also

Creating download tasks