MSSyncContextDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | MSSyncContext.h |
Overview
The MSSyncContextDelegate allows for customizing the handling of errors, conflicts, and other conditions that may occur when syncing data between the device and the mobile service.
– tableOperation:onComplete:
Called once for each entry on the queue, allowing for any adjustments to the item before it is sent to the server, or custom handling of the server’s response (such as conflict handling). Errors returned from this function will be collected and sent as a group to the [syncContext: onPushCompleteWithError: completion:] function.
- (void)tableOperation:(MSTableOperation *)operation onComplete:(MSSyncItemBlock)completion
Discussion
Called once for each entry on the queue, allowing for any adjustments to the item before it is sent to the server, or custom handling of the server’s response (such as conflict handling). Errors returned from this function will be collected and sent as a group to the [syncContext: onPushCompleteWithError: completion:] function.
Declared In
MSSyncContext.h
– syncContext:onPushCompleteWithError:completion:
Called when all operations that were triggered due to a [pushWithCompletion:] call have completed. If not provided, any errors will be passed along to the [pushWithCompletion:] call. If provided, errors can be handled and additional changes may be made to the local or remote database.
- (void)syncContext:(MSSyncContext *)context onPushCompleteWithError:(NSError *)error completion:(MSSyncPushCompletionBlock)completion
Discussion
Called when all operations that were triggered due to a [pushWithCompletion:] call have completed. If not provided, any errors will be passed along to the [pushWithCompletion:] call. If provided, errors can be handled and additional changes may be made to the local or remote database.
Declared In
MSSyncContext.h