---
title: "assetPack(withID:)"
framework: backgroundassets
role: symbol
role_heading: Instance Method
path: "backgroundassets/assetpackmanager/assetpack(withid:)"
---

# assetPack(withID:)

Returns the asset pack with the given ID.

## Declaration

```swift
func assetPack(withID id: String) async throws -> AssetPack
```

## Parameters

- `id`: The asset pack’s ID.

## Mentioned in

Downloading Apple-hosted asset packs

## Return Value

Return Value The asset pack.

## Discussion

Discussion This method may attempt to get the latest asset-pack information from the server if the system hasn’t cached that information locally. To force the system to get the latest information from the server unconditionally, call checkForUpdates(). note: ManagedBackgroundAssetsError.assetPackNotFound(withID:) when no asset pack with the given ID is found.

## See Also

### Accessing asset packs

- [manifest](backgroundassets/assetpackmanager/manifest.md)
- [AssetPackManifest](backgroundassets/assetpackmanifest.md)
- [allAssetPacks](backgroundassets/assetpackmanager/allassetpacks.md)
