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

# urlSession(_:aggregateAssetDownloadTask:didCompleteFor:)

Tells the delegate that a child task finished downloading a media selection.

```
optional func urlSession(_ session: URLSession, aggregateAssetDownloadTask: AVAggregateAssetDownloadTask, didCompleteFor mediaSelection: AVMediaSelection)
```

## Parameters

`session`

The session the asset download task is on.

`aggregateAssetDownloadTask`

The download task that finished downloading the media selection.

`mediaSelection`

The downloaded media selection.

---

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)