<!--
{
  "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/URLSessionDownloadDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSURLSessionDownloadDelegate"
  },
  "title" : "URLSessionDownloadDelegate"
}
-->

# URLSessionDownloadDelegate

A protocol that defines methods that URL session instances call on their delegates to handle task-level events specific to download tasks.

```
protocol URLSessionDownloadDelegate : URLSessionTaskDelegate
```

## Overview

In addition to the methods in this protocol, be sure to implement the methods in the [`URLSessionTaskDelegate`](/documentation/Foundation/URLSessionTaskDelegate) and [`URLSessionDelegate`](/documentation/Foundation/URLSessionDelegate) protocols to handle events common to all task types and session-level events, respectively.

> Note:
> An ``doc://com.apple.foundation/documentation/Foundation/URLSession`` object need not have a delegate. If no delegate is assigned, a system-provided delegate is used, and you must provide a completion callback to obtain the data.

## Topics

### Handling download life cycle changes

[`urlSession(_:downloadTask:didFinishDownloadingTo:)`](/documentation/Foundation/URLSessionDownloadDelegate/urlSession(_:downloadTask:didFinishDownloadingTo:))

Tells the delegate that a download task has finished downloading.

### Resuming paused downloads

[`urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`](/documentation/Foundation/URLSessionDownloadDelegate/urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:))

Tells the delegate that the download task has resumed downloading.

### Receiving progress updates

[`urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`](/documentation/Foundation/URLSessionDownloadDelegate/urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:))

Periodically informs the delegate about the download’s progress.



---

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)