Contents

addPendingDatabaseChanges:

Adds the specified database changes to the state.

Declaration

- (void) addPendingDatabaseChanges:(NSArray<CKSyncEnginePendingDatabaseChange *> *) changes;

Parameters

  • changes:

    An array of database changes.

Discussion

Use this method to enable the sync engine to manage your pending database changes. For example, when someone makes a change that your app needs to send to the server, use this method to record the change. If there are no scheduled sync operations when you invoke this method, the sync engine automatically schedules one to send the changes. After the engine sends those changes, it notifies your app’s sync delegate with an event of type CKSyncEngineSentDatabaseChangesEvent.

The sync engine maintains a consistent collection of tracked pending changes, deduplicating them as necessary. The engine removes changes from the list as it sends them, but retains any that fail due to a recoverable error, such as a network issue, or exceeding the rate limit.

See Also

Modifying pending changes