<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSURLConnectionDownloadDelegate/connectionDidFinishDownloading(_:destinationURL:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSURLConnectionDownloadDelegate(im)connectionDidFinishDownloading:destinationURL:"
  },
  "title" : "connectionDidFinishDownloading(_:destinationURL:)"
}
-->

# connectionDidFinishDownloading(_:destinationURL:)

Sent to the delegate when the URL connection has successfully downloaded the URL asset to a destination file.

```
func connectionDidFinishDownloading(_ connection: NSURLConnection, destinationURL: URL)
```

## Parameters

`connection`

The URL connection object that downloaded the asset.

`destinationURL`

A file URL specifying a destination in the file system. For iOS applications, this is a location in the application sandbox.

## Discussion

This method will be called once after a successful download. The file downloaded to `destinationURL` is guaranteed to exist there only for the duration of this method implementation; the delegate should copy or move the file to a more persistent and appropriate location.

---

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)