Contents

getLocalSizeOfAssetPackWithIdentifier:calculationMethod:completionHandler:

Calculates a locally available asset pack’s installation size.

Declaration

- (void) getLocalSizeOfAssetPackWithIdentifier:(NSString *) assetPackIdentifier calculationMethod:(BASizeCalculationMethod) calculationMethod completionHandler:(void (^)(long long size, NSError *error)) completionHandler;

Parameters

  • assetPackIdentifier:

    The asset pack’s identifier.

  • calculationMethod:

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

  • completionHandler:

    A block that receives the asset pack’s installation size in bytes or an error if one occurs. If the asset pack isn’t available locally, then the error parameter will point to an NSError object with Bamanagederrorcodeassetpacknotfound as its code.

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.