SFMetadataSyncManager Class Reference

Inherits from NSObject
Declared in SFMetadataSyncManager.h

Overview

Provides an easy way to fetch metadata using SFMetadataSyncDownTarget. This class handles creating a soup, storing synched data and reading it into a meaningful data structure, i.e. SFMetadata.

  smartStore

@property (nonatomic, strong, readonly, nonnull) SFSmartStore *smartStore

  syncManager

@property (nonatomic, strong, readonly, nonnull) SFMobileSyncSyncManager *syncManager

+ sharedInstance

Returns the instance of this class associated with current user.

+ (nonnull instancetype)sharedInstance

Return Value

Instance of this class.

Declared In

SFMetadataSyncManager.h

+ sharedInstance:

Returns the instance of this class associated with this user account.

+ (nonnull instancetype)sharedInstance:(nullable SFUserAccount *)user

Parameters

user

User account.

Return Value

Instance of this class.

Declared In

SFMetadataSyncManager.h

+ sharedInstance:smartStore:

Returns the instance of this class associated with this user and SmartStore.

+ (nonnull instancetype)sharedInstance:(nullable SFUserAccount *)user smartStore:(nullable NSString *)smartStore

Parameters

user

User account. Pass null to use current user.

smartStore

SmartStore name. Pass nil to use current user default SmartStore.

Return Value

Instance of this class.

Declared In

SFMetadataSyncManager.h

+ reset

Resets all the metadata sync managers.

+ (void)reset

Declared In

SFMetadataSyncManager.h

+ reset:

Resets the metadata sync manager for this user account.

+ (void)reset:(nullable SFUserAccount *)user

Parameters

user

User account.

Declared In

SFMetadataSyncManager.h

– fetchMetadataForObject:mode:completionBlock:

Fetches metadata for the specified object type using the specified mode and triggers the supplied completion block once complete.

- (void)fetchMetadataForObject:(nonnull NSString *)objectType mode:(SFSDKFetchMode)mode completionBlock:(nonnull SFMetadataSyncCompletionBlock)completionBlock

Parameters

objectType

Object type.

mode

Fetch mode. See SFSDKFetchMode for available modes.

completionBlock

Metadata sync completion block.

Declared In

SFMetadataSyncManager.h