<!--
{
  "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/AVAssetDownloadDelegate/urlSession(_:aggregateAssetDownloadTask:willDownloadTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVAssetDownloadDelegate(im)URLSession:aggregateAssetDownloadTask:willDownloadToURL:"
  },
  "title" : "urlSession(_:aggregateAssetDownloadTask:willDownloadTo:)"
}
-->

# urlSession(_:aggregateAssetDownloadTask:willDownloadTo:)

Tells the delegate the final location of the asset when the download completes.

```
optional func urlSession(_ session: URLSession, aggregateAssetDownloadTask: AVAggregateAssetDownloadTask, willDownloadTo location: URL)
```

## Parameters

`session`

The session the asset download task is on.

`aggregateAssetDownloadTask`

The task that downloads the asset.

`location`

The file URL to which the task downloads media.

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