<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKDownloadDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKDownloadDelegate"
  },
  "title" : "WKDownloadDelegate"
}
-->

# WKDownloadDelegate

A protocol you implement to track download progress and handle redirects, authentication challenges, and failures.

```
@MainActor protocol WKDownloadDelegate : NSObjectProtocol
```

## Topics

### Tracking Download Progress

[`download(_:decideDestinationUsing:suggestedFilename:completionHandler:)`](/documentation/WebKit/WKDownloadDelegate/download(_:decideDestinationUsing:suggestedFilename:completionHandler:))

Asks the delegate to provide a file destination where the system should write the download data.

[`downloadDidFinish(_:)`](/documentation/WebKit/WKDownloadDelegate/downloadDidFinish(_:))

Tells the delegate that the download finished.

[`download(_:didFailWithError:resumeData:)`](/documentation/WebKit/WKDownloadDelegate/download(_:didFailWithError:resumeData:))

Tells the delegate that the download failed, with error information and data you can use to restart the download.

### Responding to Authorization Challenges

[`download(_:didReceive:completionHandler:)`](/documentation/WebKit/WKDownloadDelegate/download(_:didReceive:completionHandler:))

Asks the delegate to respond to an authentication challenge.

[`WKDownload.RedirectPolicy`](/documentation/WebKit/WKDownload/RedirectPolicy)

An enumeration with cases that indicate whether to proceed with a redirect.

### Responding to Redirects

[`download(_:willPerformHTTPRedirection:newRequest:decisionHandler:)`](/documentation/WebKit/WKDownloadDelegate/download(_:willPerformHTTPRedirection:newRequest:decisionHandler:))

Asks the delegate to respond to the download’s redirect response.

[`WKDownload.RedirectPolicy`](/documentation/WebKit/WKDownload/RedirectPolicy)

An enumeration with cases that indicate whether to proceed with a redirect.



---

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)