ensureLocalAvailabilityOfAssetPacks:completionHandler:
Ensures that the specified asset packs are available locally.
Declaration
- (void) ensureLocalAvailabilityOfAssetPacks:(NSSet<BAAssetPack *> *) assetPacks completionHandler:(void (^)(NSError *error)) completionHandler;Parameters
- assetPacks:
The asset packs the local availability of which to ensure.
- completionHandler:
A block that’s called when the asset packs are all available locally or that receives an error if one occurs.
Discussion
This method checks whether the asset packs are currently downloaded. If any aren’t, then the system schedules them for download and calls the completion handler with nil for the completion handler’s error parameter after all of the downloads finish. The framework guarantees that the requested asset packs are 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 packs aren’t all guaranteed to be available locally. You can optionally monitor download progress by attaching a delegate object to delegate.
See Also
Managing asset packs
checkForUpdatesWithCompletionHandler:ensureLocalAvailabilityOfAssetPack:completionHandler:ensureLocalAvailabilityOfAssetPack:requireLatestVersion:completionHandler:ensureLocalAvailabilityOfAssetPacks:requireLatestVersions:completionHandler:assetPackIsAvailableLocallyWithIdentifier:getStatusRelativeToAssetPack:completionHandler:getLocalStatusOfAssetPackWithIdentifier:completionHandler:removeAssetPackWithIdentifier:completionHandler:getStatusOfAssetPackWithIdentifier:completionHandler: