Contents

sendChangesWithOptions:completionHandler:

Sends pending local changes to the server using the specified options.

Declaration

- (void) sendChangesWithOptions:(CKSyncEngineSendChangesOptions *) options completionHandler:(void (^)(NSError *error)) completionHandler;

Parameters

  • options:

    The options to use when sending changes. For more information, see Cksyncenginesendchangesoptions.

  • 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