<!--
{
  "availability" : [
    "iOS: 16.1.0 -",
    "iPadOS: 16.1.0 -",
    "macCatalyst: 16.1.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 18.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BackgroundAssets",
  "identifier" : "/documentation/BackgroundAssets/BADownloaderExtension-qwaw",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Background Assets"
    ],
    "preciseIdentifier" : "s:16BackgroundAssets21BADownloaderExtensionP"
  },
  "title" : "BADownloaderExtension"
}
-->

# BADownloaderExtension

An interface for reacting to app life-cycle events and processing concluded asset downloads while your app isn’t running.

```
protocol BADownloaderExtension : AppExtension
```

## Topics

### Processing downloads

[`func backgroundDownload(BADownload, didReceive: URLAuthenticationChallenge) async -> (URLSession.AuthChallengeDisposition, URLCredential?)`](/documentation/BackgroundAssets/BADownloaderExtension-qwaw/backgroundDownload(_:didReceive:))

[`func backgroundDownload(BADownload, finishedWithFileURL: URL)`](/documentation/BackgroundAssets/BADownloaderExtension-qwaw/backgroundDownload(_:finishedWithFileURL:))

[`func backgroundDownload(BADownload, failedWithError: any Error)`](/documentation/BackgroundAssets/BADownloaderExtension-qwaw/backgroundDownload(_:failedWithError:))

### Checking for asset updates

[`func downloads(for: BAContentRequest, manifestURL: URL, extensionInfo: BAAppExtensionInfo) -> Set<BADownload>`](/documentation/BackgroundAssets/BADownloaderExtension-qwaw/downloads(for:manifestURL:extensionInfo:))

[`enum BAContentRequest`](/documentation/BackgroundAssets/BAContentRequest)

A type that indicates the purpose of a content download request.

[`class BAAppExtensionInfo`](/documentation/BackgroundAssets/BAAppExtensionInfo)

### Reacting to extension events

[`func extensionWillTerminate()`](/documentation/BackgroundAssets/BADownloaderExtension-qwaw/extensionWillTerminate())

This method may be called shortly before the extension is terminated.

[`func extensionWillTerminate()`](/documentation/BackgroundAssets/BADownloaderExtension-qwaw/extensionWillTerminate()-236ac)

### Instance Methods

[`func extensionWillTerminate()`](/documentation/BackgroundAssets/BADownloaderExtension-qwaw/extensionWillTerminate())

This method may be called shortly before the extension is terminated.

## Relationships

### Inherited By

[`ManagedDownloaderExtension`](/documentation/BackgroundAssets/ManagedDownloaderExtension)

### Inherits From

[`AppExtension`](/documentation/ExtensionFoundation/AppExtension)

---

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)