<!--
{
  "availability" : [
    "iOS: 10.0.0 - 27.0.0",
    "iPadOS: 10.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",
    "watchOS: 10.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetDownloadDelegate/urlSession(_:assetDownloadTask:didFinishDownloadingTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVAssetDownloadDelegate(im)URLSession:assetDownloadTask:didFinishDownloadingToURL:"
  },
  "title" : "urlSession(_:assetDownloadTask:didFinishDownloadingTo:)"
}
-->

# urlSession(_:assetDownloadTask:didFinishDownloadingTo:)

Tells the delegate that a download task finished downloading the requested asset.

```
optional func urlSession(_ session: URLSession, assetDownloadTask: AVAssetDownloadTask, didFinishDownloadingTo location: URL)
```

## Parameters

`session`

The session the asset download task is on.

`assetDownloadTask`

The download task whose downloaded completed.

`location`

The download location of the asset.

## Discussion

Don’t move the downloaded asset from this location. Downloaded assets must remain at the system-provided URL. Instead, save a persistent reference to this URL for future use.

---

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)