---
title: "ensureLocalAvailability(of:)"
framework: backgroundassets
role: symbol
role_heading: Instance Method
path: "backgroundassets/assetpackmanager/ensurelocalavailability(of:)"
---

# ensureLocalAvailability(of:)

Ensures that the specified asset pack be available locally.

## Declaration

```swift
func ensureLocalAvailability(of assetPack: AssetPack) async throws
```

## Parameters

- `assetPack`: The asset pack the local availability of which to ensure.

## Mentioned in

Downloading Apple-hosted asset packs

## Discussion

Discussion This method checks whether the asset pack is currently downloaded. If it isn’t, then the system schedules it to be downloaded and waits for the download to complete. It’s guaranteed that the requested asset pack will be available locally once this method returns without throwing. If the method throws, then the asset pack is not guaranteed to be available locally. You can optionally monitor download progress by awaiting status updates from statusUpdates or statusUpdates(forAssetPackWithID:) in a separate task. note: When the asset pack can’t be downloaded.

## See Also

### Managing asset packs

- [checkForUpdates()](backgroundassets/assetpackmanager/checkforupdates().md)
- [ensureLocalAvailability(of:requireLatestVersion:)](backgroundassets/assetpackmanager/ensurelocalavailability(of:requirelatestversion:).md)
- [ensureLocalAvailability(of:requireLatestVersions:)](backgroundassets/assetpackmanager/ensurelocalavailability(of:requirelatestversions:).md)
- [assetPackIsAvailableLocally(withID:)](backgroundassets/assetpackmanager/assetpackisavailablelocally(withid:).md)
- [status(relativeTo:)](backgroundassets/assetpackmanager/status(relativeto:).md)
- [localStatus(ofAssetPackWithID:)](backgroundassets/assetpackmanager/localstatus(ofassetpackwithid:).md)
- [AssetPack.Status](backgroundassets/assetpack/status.md)
- [remove(assetPackWithID:)](backgroundassets/assetpackmanager/remove(assetpackwithid:).md)
- [status(ofAssetPackWithID:)](backgroundassets/assetpackmanager/status(ofassetpackwithid:).md)
