<!--
{
  "availability" : [
    "iOS: 11.0.0 - 27.0.0",
    "iPadOS: 11.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.15.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetDownloadURLSession/aggregateAssetDownloadTask(with:mediaSelections:assetTitle:assetArtworkData:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetDownloadURLSession(im)aggregateAssetDownloadTaskWithURLAsset:mediaSelections:assetTitle:assetArtworkData:options:"
  },
  "title" : "aggregateAssetDownloadTask(with:mediaSelections:assetTitle:assetArtworkData:options:)"
}
-->

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

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

```
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

[`AVAssetDownloadTaskMinimumRequiredMediaBitrateKey`](/documentation/AVFoundation/AVAssetDownloadTaskMinimumRequiredMediaBitrateKey)

A key that indicates the minimum bit rate of the variant to download.

[`AVAssetDownloadTaskMinimumRequiredPresentationSizeKey`](/documentation/AVFoundation/AVAssetDownloadTaskMinimumRequiredPresentationSizeKey)

A key that indicates the minimum presentation size of the variant to download.

[`AVAssetDownloadTaskMediaSelectionKey`](/documentation/AVFoundation/AVAssetDownloadTaskMediaSelectionKey)

A key that indicates which media selection to download.

[`AVAssetDownloadTaskMediaSelectionPrefersMultichannelKey`](/documentation/AVFoundation/AVAssetDownloadTaskMediaSelectionPrefersMultichannelKey)

A key that indicates whether the task downloads media selections with support for multichannel playback, when available.

[`AVAssetDownloadTaskPrefersHDRKey`](/documentation/AVFoundation/AVAssetDownloadTaskPrefersHDRKey)

A key that indicates whether the task downloads HDR instead of SDR video, when available.

[`AVAssetDownloadTaskPrefersLosslessAudioKey`](/documentation/AVFoundation/AVAssetDownloadTaskPrefersLosslessAudioKey)

A key that indicates whether the task downloads media selections in lossless audio format, when available.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)