---
title: BAManagedDownloaderExtension
framework: backgroundassets
role: symbol
role_heading: Protocol
path: backgroundassets/bamanageddownloaderextension
---

# BAManagedDownloaderExtension

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

## Declaration

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

## Overview

Overview The protocol provides default implementations for all of the inherited BADownloaderExtension requirements. warning: Don’t implement any of the inherited BADownloaderExtension requirements aside from, optionally, 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: Remove BackgroundDownloadHandler.swift. Create DownloaderExtension.h with the following contents: Apple Hosting #import <StoreKit/StoreKit.h>

@interface DownloaderExtension : NSObject <SKDownloaderExtension>

@end Self Hosting #import <BackgroundAssets/BackgroundAssets.h>

@interface DownloaderExtension : NSObject <BAManagedDownloaderExtension>

@end Create DownloaderExtension.m with the following contents: #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 Add DownloaderExtension.m to your extension’s target. Add the following snippet inside your extension’s Info.plist’s EXAppExtensionAttributes dictionary: <key>EXPrincipalClass</key> <string>DownloaderExtension</string> 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

- [shouldDownloadAssetPack:](backgroundassets/bamanageddownloaderextension/shoulddownloadassetpack:.md)

## Relationships

### Inherits From

- [BADownloaderExtension](backgroundassets/badownloaderextension-zuvm.md)

## See Also

### Managed asset packs

- [BAAssetPack](backgroundassets/baassetpack.md)
- [BAAssetPackStatus](backgroundassets/baassetpackstatus.md)
- [BAAssetPackManager](backgroundassets/baassetpackmanager.md)
- [BAAssetPackManifest](backgroundassets/baassetpackmanifest.md)
- [BAManagedAssetPackDownloadDelegate](backgroundassets/bamanagedassetpackdownloaddelegate.md)
- [BAAppGroupID](bundleresources/information-property-list/baappgroupid.md)
- [BAHasManagedAssetPacks](bundleresources/information-property-list/bahasmanagedassetpacks.md)
