<!--
{
  "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/AssetPackManager/localSize(ofAssetPackWithID:calculationMethod:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Background Assets"
    ],
    "preciseIdentifier" : "s:16BackgroundAssets16AssetPackManagerC9localSize02ofcD6WithID17calculationMethods5Int64VSS_So017BASizeCalculationL0VtYaKF"
  },
  "title" : "localSize(ofAssetPackWithID:calculationMethod:)"
}
-->

# localSize(ofAssetPackWithID:calculationMethod:)

Calculates a locally available asset pack’s installation size.

```
func localSize(ofAssetPackWithID assetPackID: String, calculationMethod: SizeCalculationMethod) async throws -> Int64
```

## Parameters

`assetPackID`

The asset pack’s ID.

`calculationMethod`

The method to use to calculate the asset pack’s installation size.

## Return Value

The asset pack’s installation size in bytes.

## Discussion

This is different than the download size, which could be smaller. Calculating the size of an asset pack that contains many files can take a long time.

> Throws: ``doc://com.apple.backgroundassets/documentation/BackgroundAssets/ManagedBackgroundAssetsError/assetPackNotFound(withID:)`` when no asset pack with the specified ID is available locally.

---

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)