One Logo Pool Ball
BackgroundAssets · IOS API REFERENCE

AssetPack

struct · iOS 26.0+ · SDK 27.1

struct AssetPack

An archive of assets that the system downloads together. An instance of this structure can be invalidated when the asset pack that it represents is updated on the server.

Members (8)

get · iOS 26.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 26.0+

downloadSize

TypeScript
get downloadSize(): number
Swift declaration
let downloadSize: Int

The size of the download file containing the asset pack in bytes. This is different than the installation size, which could be larger.

get · iOS 26.0+

id

TypeScript
get id(): string
Swift declaration
let id: String

A unique ID for the asset pack.

init · iOS 26.0+

init

TypeScript
static init(decoder: SDKHandle, configuration: AssetPackManifest_DecodingConfiguration): AssetPack
Swift declaration
init(from decoder: any Decoder, configuration: AssetPack.DecodingConfiguration) throws

Creates a new instance by retrieving the instance's data from the specified decoder with help from the provided configuration. - Parameters: - decoder: The decoder to read data from. - configuration: A decoding configuration instance that provides additional information necessary for decoding.

get · iOS 26.0+

version

TypeScript
get version(): number
Swift declaration
let version: Int

The asset pack’s version number.

method · iOS 26.0+

download

TypeScript
download(contentRequest?: (BAContentRequest) | null): BADownload
Swift declaration
func download(for contentRequest: BAContentRequest?) -> BADownload

Creates a download object for the asset pack that you schedule using a download manager. - Parameter contentRequest: The content request for the current extension invocation. Pass `nil` if you’re calling this method in your main app. - Returns: A download object.

get · iOS 27.0+

language

TypeScript
get language(): (_Foundation_Locale_Language) | null
Swift declaration
let language: Locale.Language?

The language for which this asset pack is localized. This property is `nil` if the asset pack isn’t localized and therefore isn’t language-specific.

get · iOS 26.0+

userInfo

TypeScript
get userInfo(): (ArrayBuffer) | null
Swift declaration
let userInfo: Data?

JSON-encoded custom information that’s associated with the asset pack. This property is `nil` for Apple-hosted asset packs.

Skipped declarations

No declarations were skipped in this snapshot.

All BackgroundAssets types →