TechnologiesFoundation, System & Concurrency

BackgroundAssets

iOSmacOStvOSwatchOSvisionOS

BackgroundAssets lets an app extension schedule and manage downloads of large assets in the background, before or after the app launches. You implement a downloader extension conforming to BADownloaderExtension or ManagedDownloaderExtension, then use BADownloadManager and its BADownloadManagerDelegate to enqueue and track BADownload work such as BAURLDownload, handling failures through BAErrorCode. The framework also models packaged content with AssetPack, AssetPackManifest, and the AssetPackManager actor, and exposes the extension's context through BAAppExtensionInfo. It is available on iOS, macOS, tvOS, and visionOS.

Downloader Extensions 4

Protocols you adopt to build the app extension that schedules and responds to background asset downloads.

  • Pr
    BADownloaderExtension
    A protocol your app extension adopts to schedule and manage background asset downloads.
  • Pr
    ManagedDownloaderExtension
    An app extension that uses the system implementation to schedule asset-pack downloads automatically.
  • Cl
    BAAppExtensionInfomacOS 13.0+
    An object that exposes contextual information about the running downloader app extension.
  • En
    BAContentRequestmacOS 13+
    @abstract The content request type used in the BADownloaderExtension.

Managing Downloads 2

The manager and delegate you use to enqueue, track, and respond to background download work.

  • Cl
    BADownloadManagermacOS 13.0+
    An object that schedules, enqueues, and tracks background asset downloads.
  • Pr
    BADownloadManagerDelegatemacOS 13.0+
    A protocol you implement to receive progress and completion updates for background downloads.

Downloads 2

Types that represent an individual background download and its URL-based variant.

  • Cl
    BADownloadmacOS 13.0+
    An object that represents a single background asset download and its current state.
  • Cl
    BAURLDownloadmacOS 13.0+
    An object that represents a background asset download identified by a URL.

Asset Packs 3

Types that model packaged downloadable content and the manager that fetches it.

  • Ac
    AssetPackManager
    An actor that manages asset packs.
  • St
    AssetPack
    An archive of assets that the system downloads together.
  • St
    AssetPackManifest
    A manifest of asset packs that are available to download.

Errors 2

Error types that describe failures during background asset downloads.

  • En
    BAErrorCodemacOS 14.0+
    @typedef Background Assets error codes.
  • En
    ManagedBackgroundAssetsError
    An error for a managed asset pack.

Protocols 2

  • Pr
    BADownloaderExtensionConfiguration
  • Pr
    ManagedDownloaderExtensionConfiguration
← Foundation, System & Concurrency