---
title: "localSize(ofAssetPackWithID:calculationMethod:)"
framework: Background Assets
role: symbol
role_heading: Instance Method
platforms: [iOS 27.2+, iPadOS 27.2+, Mac Catalyst 27.2+, macOS 27.2+, tvOS 27.2+, visionOS 27.2+]
path: "backgroundassets/assetpackmanager/localsize(ofassetpackwithid:calculationmethod:)"
---

# localSize(ofAssetPackWithID:calculationMethod:)

Calculates a locally available asset pack’s installation size.

## Declaration

```swift
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

Return Value The asset pack’s installation size in bytes.

## Discussion

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. note: ManagedBackgroundAssetsError.assetPackNotFound(withID:) when no asset pack with the specified ID is available locally.
