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

# localVersionOfAssetPackWithIdentifier:error:

Returns a locally available asset pack’s version number.

```
- (NSInteger) localVersionOfAssetPackWithIdentifier:(NSString *) assetPackIdentifier error:(NSError **) error;
```

## Parameters

`assetPackIdentifier`

The asset pack’s identifier.

`error`

A pointer to an error that will be set if an error occurs. If the asset pack isn’t available locally, then `error` will point to an `NSError` object with [`BAManagedErrorCodeAssetPackNotFound`](/documentation/BackgroundAssets/BAManagedErrorCode/BAManagedErrorCodeAssetPackNotFound) as its code.

## Return Value

The asset pack’s version number. A return value of `-1` indicates that an error occurred.

---

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)