ALAssetUpdateManager Class Reference

Inherits from NSObject
Declared in ALAssetUpdateManager.h

Overview

Object handling the update of assets

  count

Total number of asse update tasks

@property (nonatomic, readonly) NSInteger count

Declared In

ALAssetUpdateManager.h

  assetUpdateTaskFactory

@property (nonatomic, strong, nullable) ALAssetUpdateTaskFactory *assetUpdateTaskFactory

Declared In

ALAssetUpdateManager.h

+ sharedManager

A shared (singleton) instance of this object

+ (ALAssetUpdateManager *)sharedManager

Declared In

ALAssetUpdateManager.h

– initWithAssetUpdateTaskFactory:

Initializes an ALAssetUpdateManager object

- (instancetype)initWithAssetUpdateTaskFactory:(ALAssetUpdateTaskFactory *_Nullable)assetUpdateTaskFactory

Parameters

assetUpdateTaskFactory

assetUpdateTaskFactory

Return Value

an ALAssetUpdateManager object

Declared In

ALAssetUpdateManager.h

– init

Initializes an ALAssetUpdateManager object

- (instancetype)init

Return Value

an ALAssetUpdateManager object

Declared In

ALAssetUpdateManager.h

– addUpdateTask:delegate:

Adds an update task to the update manager

- (void)addUpdateTask:(ALAssetContext *)assetContext delegate:(id<ALAssetUpdateDelegate> _Nonnull)delegate

Parameters

assetContext

the asset context for which updates are to be managed

delegate

the object to be notified about events happening in the asset update manager

Declared In

ALAssetUpdateManager.h

– assetUpdateTaskWithID:

Returns an asset update task previously added, given its ID

- (ALAssetUpdateTask *_Nullable)assetUpdateTaskWithID:(NSString *)id

Parameters

id

the asset task ID

Return Value

the ALAssetUpdateTask associated with the ID param

Declared In

ALAssetUpdateManager.h

– localAssetsFound:

Returns whether there are local assets found for the asset task with the ID given

- (BOOL)localAssetsFound:(NSString *)id

Parameters

id

the asset task ID

Return Value

whether there are locally-downloaded assets on the device for the asset

Declared In

ALAssetUpdateManager.h

– checkForUpdates:downloadIfOutdated:

Checks whether an asset is out of date, and with a parameter download the updated asset files

- (void)checkForUpdates:(NSString *)id downloadIfOutdated:(BOOL)downloadIfOutdated

Parameters

id

the id of the asset task

downloadIfOutdated

download the files for a asset context if possible. Otherwise, only inform the delegate that updates are available

Declared In

ALAssetUpdateManager.h

– requestAssetDownload:

Request to download files associated with the asset task id

- (void)requestAssetDownload:(NSString *)id

Parameters

id

the id of the asset task

Declared In

ALAssetUpdateManager.h

– resetTask:

Restore the asset update task to initial values

- (void)resetTask:(NSString *)id

Parameters

id

the id of the asset task

Declared In

ALAssetUpdateManager.h

– removeUpdateTask:

Remove the asset update task from the update manager

- (ALAssetUpdateTask *_Nullable)removeUpdateTask:(NSString *)id

Parameters

id

the id of the asset task

Declared In

ALAssetUpdateManager.h

– removeAll

Remove all asset update tasks from the update manager

- (void)removeAll

Declared In

ALAssetUpdateManager.h

– assetControllerForID:

Obtain the asset controller associated with an asset update task ID

- (ALAssetController *_Nullable)assetControllerForID:(NSString *)id

Parameters

id

the id of the asset task

Declared In

ALAssetUpdateManager.h