SFLayoutSyncManager Class Reference

Inherits from NSObject
Declared in SFLayoutSyncManager.h

Overview

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

  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

SFLayoutSyncManager.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

SFLayoutSyncManager.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

SFLayoutSyncManager.h

+ reset

Resets all the layout sync managers.

+ (void)reset

Declared In

SFLayoutSyncManager.h

+ reset:

Resets the layout sync manager for this user account.

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

Parameters

user

User account.

Declared In

SFLayoutSyncManager.h

– fetchLayoutForObjectAPIName:formFactor:layoutType:mode:recordTypeId:syncMode:completionBlock:

Fetches layout data for the specified parameters using the specified sync mode and triggers the supplied completion block once complete.

- (void)fetchLayoutForObjectAPIName:(nonnull NSString *)objectAPIName formFactor:(nullable NSString *)formFactor layoutType:(nullable NSString *)layoutType mode:(nullable NSString *)mode recordTypeId:(nullable NSString *)recordTypeId syncMode:(SFSDKFetchMode)syncMode completionBlock:(nonnull SFLayoutSyncCompletionBlock)completionBlock

Parameters

objectAPIName

Object API name.

formFactor

Form factor. Could be “Large”, “Medium” or “Small”. Default value is “Large”.

layoutType

Layout type. Defaults to “Full” if nil is passed in.

mode

Mode. Could be “Create”, “Edit” or “View”. Default value is “View”.

recordTypeId

Record type ID. Default will be used if not supplied.

syncMode

Fetch mode. See SFSDKFetchMode for available modes.

completionBlock

Layout sync completion block.

Declared In

SFLayoutSyncManager.h