<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "macOS: 26.4.0 -",
    "tvOS: 26.4.0 -",
    "visionOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BackgroundAssets",
  "identifier" : "/documentation/BackgroundAssets/BAAssetPackManager/ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Background Assets"
    ],
    "preciseIdentifier" : "c:objc(cs)BAAssetPackManager(im)ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:"
  },
  "title" : "ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:"
}
-->

# ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:

Ensures that the specified asset pack is available locally, performing a download if necessary.

```
- (void) ensureLocalAvailabilityOfAssetPack:(BAAssetPack *) assetPack requireLatestVersion:(BOOL) shouldUpdate completionHandler:(void (^)(NSError *error)) completionHandler;
```

## Parameters

`assetPack`

The asset pack the local availability of which to ensure.

`shouldUpdate`

Whether to require that the latest version be available locally. When `YES` is passed to this parameter, the method will wait for the update (if there indeed is one available) to be downloaded before returning. When `NO` is passed, the method won’t check for updates and won’t attempt to download any.

`completionHandler`

A block that’s called when the asset pack is available locally or that receives an error if one occurs.

## Discussion

This method checks whether the asset pack is currently downloaded. If it isn’t, then the system schedules it to be downloaded and calls the completion handler with `nil` for the completion handler’s `error` parameter when the download finishes. The framework guarantees that the requested asset pack is available locally after this method calls the completion handler with `nil` for the `error` parameter. If this method calls the completion handler with a non-`nil` value for `error`, then the asset pack *isn’t* guaranteed to be available locally. You can optionally monitor download progress by attaching a delegate object to [`delegate`](/documentation/BackgroundAssets/BAAssetPackManager/delegate).

To download multiple asset packs at the same time, use [`ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:`](/documentation/BackgroundAssets/BAAssetPackManager/ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)