A manifest of asset packs that are available to download.
Members (12)
method · iOS 27.0+
assetPack
TypeScript
assetPack(id: string): (AssetPack) | null
Swift declaration
func assetPack(withID id: String) -> AssetPack?
Returns the asset pack in this manifest with the given ID.
- Parameter id: The asset pack’s ID.
- Returns: The asset pack, if it could be found in this manifest; otherwise, `nil`.
Returns the subset of asset packs in this manifest that are available to download and that best match the specified language.
Depending on which languages are available, the returned asset packs’ respective languages may not exactly match the specified language.
- Parameter language: The language.
- Returns: The localized asset packs.
get · iOS 27.0+
localizedAssetPacks
TypeScript
get localizedAssetPacks(): Array<AssetPack>
Swift declaration
var localizedAssetPacks: Set<AssetPack> { get }
The subset of asset packs in this manifest that best match the current preferred languages.
get · iOS 26.0+
assetPacks
TypeScript
get assetPacks(): Array<AssetPack>
Swift declaration
let assetPacks: Set<AssetPack>
The asset packs in this manifest that are available to download.
Creates a manifest in memory given a URL to the manifest’s representation as a JSON file on disk.
- Parameters:
- url: A URL to a local JSON file.
- appGroupID: The ID of the app group in which to store unmanaged asset packs that are downloaded from this manifest.
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.
Creates download objects for every applicable asset pack in this manifest, which can be scheduled with the download manager.
- Parameter contentRequest: The content request for the current extension invocation. Pass `nil` if when calling this method in your main app.
- Returns: A collection of download objects.
get · iOS 27.0+
primaryLanguage
TypeScript
get primaryLanguage(): (_Foundation_Locale_Language) | null
Swift declaration
var primaryLanguage: Locale.Language? { get }
The app’s primary language as configured in App Store Connect.
If no available localized asset packs match the current preferred languages, then the system falls back on the app’s primary language.
get · iOS 27.0+
resolvedLanguage
TypeScript
get resolvedLanguage(): (_Foundation_Locale_Language) | null
Swift declaration
var resolvedLanguage: Locale.Language? { get }
The language that best matches current preferences and for which a localized asset pack is available locally.
The preferred languages set in Settings or System Settings inform the choice of resolved language, respecting any language that your app sets manually by setting ``AssetPackManager/resolvedLanguage``. This property may be `nil` if no localized asset packs are available. If a person using the device recently changed their preferred language or if this manifest is outdated, then this property’s value may be out of sync with the set of asset packs that are available locally.
get · iOS 27.0+
availableLanguages
TypeScript
get availableLanguages(): Array<_Foundation_Locale_Language>
Swift declaration
var availableLanguages: [Locale.Language] { get }
The languages for which asset packs in this manifest are localized.
Creates a manifest in memory given JSON-encoded data.
- Parameters:
- data: JSON-encoded data.
- appGroupID: The ID of the app group in which to store unmanaged asset packs that are downloaded from this manifest.
init(from decoder: any Decoder, configuration: AssetPackManifest.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.