---
title: NSURLSessionDownloadTaskResumeData
framework: foundation
role: symbol
role_heading: Global Variable
path: foundation/nsurlsessiondownloadtaskresumedata
---

# NSURLSessionDownloadTaskResumeData

A key in the error dictionary that provides resume data.

## Declaration

```swift
let NSURLSessionDownloadTaskResumeData: String
```

## Mentioned in

Pausing and resuming downloads

## Discussion

Discussion When a transfer error occurs or when you call the cancel(byProducingResumeData:) method, the delegate object or completion handler gets an 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:) or downloadTask(withResumeData:completionHandler:) method.

## See Also

### User info dictionary keys

- [NSURLErrorBackgroundTaskCancelledReasonKey](foundation/nsurlerrorbackgroundtaskcancelledreasonkey.md)
