SFSyncDownTarget Class Reference
Inherits from | SFSyncTarget : NSObject |
---|---|
Declared in | SFSyncDownTarget.h |
Other Methods
+ newFromDict:
Methods to translate to/from dictionary
+ (nullable SFSyncDownTarget *)newFromDict:(NSDictionary *)dict
Declared In
SFSyncDownTarget.h
– startFetch:maxTimeStamp:errorBlock:completeBlock:
Start fetching records conforming to target
- (void)startFetch:(SFMobileSyncSyncManager *)syncManager maxTimeStamp:(long long)maxTimeStamp errorBlock:(SFSyncDownTargetFetchErrorBlock)errorBlock completeBlock:(SFSyncDownTargetFetchCompleteBlock)completeBlock
Declared In
SFSyncDownTarget.h
– continueFetch:errorBlock:completeBlock:
Continue fetching records conforming to target if any
- (void)continueFetch:(SFMobileSyncSyncManager *)syncManager errorBlock:(SFSyncDownTargetFetchErrorBlock)errorBlock completeBlock:(nullable SFSyncDownTargetFetchCompleteBlock)completeBlock
Declared In
SFSyncDownTarget.h
– getLatestModificationTimeStamp:
Gets the latest modification timestamp from the array of records. Note: inheriting classes can override this method to determine the timestamp in a customized way. The default implementation looks at the LastModifiedDate field of each record.
- (long long)getLatestModificationTimeStamp:(NSArray *)records
Parameters
records |
The array of records to query. |
---|
Return Value
The timestamp of the record with the most recent modification date.
Declared In
SFSyncDownTarget.h
– isSyncDownSortedByLatestModification
When sync down fetches records from older to newer, the maxTimeStamp
value for the sync
can be updated throughout the sync range. In this case, resuming a paused or canceled sync later
does not refetch all records.
- (BOOL)isSyncDownSortedByLatestModification
Return Value
YES if sync down is sorted by latest modification time stamp.
Declared In
SFSyncDownTarget.h
– cleanGhosts:soupName:syncId:errorBlock:completeBlock:
Delete from local store records that a full sync down would no longer download
- (void)cleanGhosts:(SFMobileSyncSyncManager *)syncManager soupName:(NSString *)soupName syncId:(NSNumber *)syncId errorBlock:(SFSyncDownTargetFetchErrorBlock)errorBlock completeBlock:(SFSyncDownTargetFetchCompleteBlock)completeBlock
Parameters
syncManager |
The sync manager |
---|---|
soupName |
The soup to clean |
syncId |
The sync id |
errorBlock |
Block to execute in case of error |
completeBlock |
Block to execute upon completion |
Declared In
SFSyncDownTarget.h
– getIdsToSkip:soupName:
Get ids of records that should not be written over during a sync down with merge mode leave-if-changed
- (NSOrderedSet *)getIdsToSkip:(SFMobileSyncSyncManager *)syncManager soupName:(NSString *)soupName
Parameters
syncManager |
The sync manager |
---|---|
soupName |
The soup |
Return Value
set of ids
Declared In
SFSyncDownTarget.h
+ queryTypeFromString:
Enum to/from string helper methods
+ (SFSyncDownTargetQueryType)queryTypeFromString:(NSString *)queryType
Declared In
SFSyncDownTarget.h
Extension Methods
– buildSyncIdPredicateIfIndexed:soupName:syncId:
- (NSString *)buildSyncIdPredicateIfIndexed:(SFMobileSyncSyncManager *)syncManager soupName:(NSString *)soupName syncId:(NSNumber *)syncId
– getNonDirtyRecordIdsSql:idField:additionalPredicate:
- (NSString *)getNonDirtyRecordIdsSql:(NSString *)soupName idField:(NSString *)idField additionalPredicate:(NSString *)additionalPredicate
– getNonDirtyRecordIds:soupName:idField:additionalPredicate:
- (NSOrderedSet *)getNonDirtyRecordIds:(SFMobileSyncSyncManager *)syncManager soupName:(NSString *)soupName idField:(NSString *)idField additionalPredicate:(NSString *)additionalPredicate