<!--
{
  "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/connectionDidResumeDownloading(_:totalBytesWritten:expectedTotalBytes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSURLConnectionDownloadDelegate(im)connectionDidResumeDownloading:totalBytesWritten:expectedTotalBytes:"
  },
  "title" : "connectionDidResumeDownloading(_:totalBytesWritten:expectedTotalBytes:)"
}
-->

# connectionDidResumeDownloading(_:totalBytesWritten:expectedTotalBytes:)

Sent to the delegate when an URL connection resumes downloading a URL asset that was earlier suspended.

```
optional func connectionDidResumeDownloading(_ connection: NSURLConnection, totalBytesWritten: Int64, expectedTotalBytes: Int64)
```

## Parameters

`connection`

The URL connection object downloading the asset.

`totalBytesWritten`

The total number of bytes of the downloading asset that have been written to the destination file.

`expectedTotalBytes`

The total number of bytes of the URL asset once it is completely downloaded and written to a file.

## Discussion

This method is invoked once a suspended download of a URL asset resumes downloading. In response, the delegate can display a progress indicator, setting the initial value of the indicator to where it was when downloading was suspended. After the URL-connection object sends this message, it sends one or more [`connection(_:didWriteData:totalBytesWritten:expectedTotalBytes:)`](/documentation/Foundation/NSURLConnectionDownloadDelegate/connection(_:didWriteData:totalBytesWritten:expectedTotalBytes:)) to the delegate until the download concludes.

---

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)