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

# BAManagedDownloaderExtension

An application extension that uses the system implementation to schedule asset-pack downloads automatically.

```
@protocol BAManagedDownloaderExtension <BADownloaderExtension>
```

## Overview

The protocol provides default implementations for all of the inherited [`BADownloaderExtension`](/documentation/BackgroundAssets/BADownloaderExtension-zuvm) requirements.

> Warning: Don’t implement any of the inherited ``doc://com.apple.backgroundassets/documentation/BackgroundAssets/BADownloaderExtension-zuvm`` requirements aside from, optionally, ``doc://com.apple.backgroundassets/documentation/BackgroundAssets/BADownloaderExtension-zuvm/backgroundDownload:didReceiveChallenge:completionHandler:``.

## Creating an Objective-C Downloader Extension

Xcode’s Background Download extension template generates Swift code when you select either the “Apple-Hosted, Managed” option or the “Self-Hosted, Managed” option, but you can easily switch to Objective-C instead if you prefer. To do so, follow these steps:

1. Remove `BackgroundDownloadHandler.swift`.
2. Create `DownloaderExtension.h` with the following contents:
   
   ### Apple Hosting
   
   ```objc
   #import <StoreKit/StoreKit.h>
   
   @interface DownloaderExtension : NSObject <SKDownloaderExtension>
   
   @end
   ```
   
   ### Self Hosting
   
   ```objc
   #import <BackgroundAssets/BackgroundAssets.h>
   
   @interface DownloaderExtension : NSObject <BAManagedDownloaderExtension>
   
   @end
   ```
3. Create `DownloaderExtension.m` with the following contents:
   
   ```objc
   #import "DownloaderExtension.h"
   
   @implementation DownloaderExtension
   
   - (BOOL)shouldDownloadAssetPack:(BAAssetPack *)assetPack {
       // Use this method to filter out asset packs that the system would otherwise download automatically. You can also remove this method entirely if you just want to rely on the default download behavior.
       return true;
   }
   
   @end
   ```
4. Add `DownloaderExtension.m` to your extension’s target.
5. Add the following snippet inside your extension’s `Info.plist`’s `EXAppExtensionAttributes` dictionary:
   
   ```plist
   <key>EXPrincipalClass</key>
   <string>DownloaderExtension</string>
   ```
6. Check that the downloader extension’s target explicitly links the Background Assets framework under Frameworks and Libraries in the target editor’s General tab. If it doesn’t, then click to add an item to the list. Select “BackgroundAssets.framework” under Apple SDKs, then click Add.

## Topics

### Downloading asset packs

[`- (BOOL) shouldDownloadAssetPack:(BAAssetPack *) assetPack;`](/documentation/BackgroundAssets/BAManagedDownloaderExtension/shouldDownloadAssetPack:)

Determines whether to download an asset pack.

## Relationships

### Inherits From

[`BADownloaderExtension-zuvm`](/documentation/BackgroundAssets/BADownloaderExtension-zuvm)

---

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)