<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetDownloadURLSession",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAssetDownloadURLSession"
  },
  "title" : "AVAssetDownloadURLSession"
}
-->

# AVAssetDownloadURLSession

A URL session that creates and manages asset download tasks.

```
class AVAssetDownloadURLSession
```

## Overview

Create an [`AVAssetDownloadURLSession`](/documentation/AVFoundation/AVAssetDownloadURLSession) by calling [`init(configuration:assetDownloadDelegate:delegateQueue:)`](/documentation/AVFoundation/AVAssetDownloadURLSession/init(configuration:assetDownloadDelegate:delegateQueue:)) with a background <doc://com.apple.documentation/documentation/Foundation/URLSessionConfiguration>. The background configuration supports reliable downloading while the app is in a suspended state.

> Important: The standard `URLSession` initializers and task-creation methods are unavailable on this class. Use ``doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetDownloadURLSession/init(configuration:assetDownloadDelegate:delegateQueue:)`` to create a session and ``doc://com.apple.avfoundation/documentation/AVFoundation/AVAssetDownloadURLSession/makeAssetDownloadTask(downloadConfiguration:)`` to create download tasks.

Background sessions persist across app launches. The system manages downloads out-of-process so they continue while your app is in a suspended state. If the system terminates your app while downloads are in progress, it relaunches the app and calls <doc://com.apple.documentation/documentation/UIKit/UIApplicationDelegate/application(_:handleEventsForBackgroundURLSession:completionHandler:)> with the session identifier. Recreate the [`AVAssetDownloadURLSession`](/documentation/AVFoundation/AVAssetDownloadURLSession) using the same background configuration identifier to reconnect to the running session and receive pending delegate callbacks. Call the provided completion handler after all callbacks finish. If a person force-quits your app, the system cancels all active downloads and doesn’t relaunch the app.

Mark the background session configuration as discretionary to let the system defer downloads until network and battery conditions are favorable. You can only start a non-discretionary download task while your app is in the foreground. Reserve non-discretionary sessions for downloads that a person explicitly starts. Use a discretionary session for opportunistic downloads that happen without a person’s direct involvement.

Assign an [`AVAssetDownloadDelegate`](/documentation/AVFoundation/AVAssetDownloadDelegate) to the session to receive download progress, media-selection resolution, and completion callbacks for every download task the session creates.

## Topics

### Creating a download session

[`init(configuration:assetDownloadDelegate:delegateQueue:)`](/documentation/AVFoundation/AVAssetDownloadURLSession/init(configuration:assetDownloadDelegate:delegateQueue:))

Creates a URL session to download assets.

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

A protocol that defines the methods to implement to respond to asset-download events.

### Creating download tasks

[`makeAssetDownloadTask(downloadConfiguration:)`](/documentation/AVFoundation/AVAssetDownloadURLSession/makeAssetDownloadTask(downloadConfiguration:))

Creates a download task that uses the specified configuration.

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

An object that provides the configuration for a download task.

[`makeAssetDownloadTask(asset:assetTitle:assetArtworkData:options:)`](/documentation/AVFoundation/AVAssetDownloadURLSession/makeAssetDownloadTask(asset:assetTitle:assetArtworkData:options:))

Creates a download task to download the asset.

[`aggregateAssetDownloadTask(with:mediaSelections:assetTitle:assetArtworkData:options:)`](/documentation/AVFoundation/AVAssetDownloadURLSession/aggregateAssetDownloadTask(with:mediaSelections:assetTitle:assetArtworkData:options:))

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

[`makeAssetDownloadTask(asset:destinationURL:options:)`](/documentation/AVFoundation/AVAssetDownloadURLSession/makeAssetDownloadTask(asset:destinationURL:options:))

Creates a download task to download the asset to the indicated location.

### 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)