<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetDownloadDelegate/urlSession(_:assetDownloadTask:willDownloadVariants:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVAssetDownloadDelegate(im)URLSession:assetDownloadTask:willDownloadVariants:"
  },
  "title" : "urlSession(_:assetDownloadTask:willDownloadVariants:)"
}
-->

# urlSession(_:assetDownloadTask:willDownloadVariants:)

Tells the delegate that a download task completed variant selection.

```
optional func urlSession(_ session: URLSession, assetDownloadTask: AVAssetDownloadTask, willDownloadVariants variants: [AVAssetVariant])
```

## Parameters

`session`

The session the asset download task is on.

`assetDownloadTask`

The task that finished selecting variant selection.

`variants`

The asset variants to download.

## Discussion

---

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)