Contents

sendChangesWithCompletionHandler:

Sends pending local changes to the server.

Declaration

- (void) sendChangesWithCompletionHandler:(void (^)(NSError *error)) completionHandler;

Parameters

  • completionHandler:

    The block to execute when the send completes.

Discussion

If the send fails, the completion handler’s error parameter is an object that describes that failure; otherwise, it’s nil.

Use this method to request the sync engine sends all pending local changes to the server before your app continues. This isn’t necessary in normal use, as the engine automatically syncs your app’s records. It is useful, however, in scenarios where you require greater control over sync, such as a “Backup now” button or unit tests.

See Also

Invoking manual sync operations