<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSURLSessionDownloadTaskResumeData",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSURLSessionDownloadTaskResumeData"
  },
  "title" : "NSURLSessionDownloadTaskResumeData"
}
-->

# NSURLSessionDownloadTaskResumeData

A key in the error dictionary that provides resume data.

```
let NSURLSessionDownloadTaskResumeData: String
```

## Discussion

When a transfer error occurs or when you call the [`cancel(byProducingResumeData:)`](/documentation/Foundation/URLSessionDownloadTask/cancel(byProducingResumeData:)) method, the delegate object or completion handler gets an [`NSError`](/documentation/Foundation/NSError) object. If the transfer is resumable, that error object’s `userInfo` dictionary contains a value for this key. To resume the transfer, your app can pass that value to the [`downloadTask(withResumeData:)`](/documentation/Foundation/URLSession/downloadTask(withResumeData:)) or [`downloadTask(withResumeData:completionHandler:)`](/documentation/Foundation/URLSession/downloadTask(withResumeData:completionHandler:)) method.

---

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)