syncEngine:nextRecordZoneChangeBatchForContext:
Asks the delegate to provide the next set of record changes to send to the server.
Declaration
- (CKSyncEngineRecordZoneChangeBatch *) syncEngine:(CKSyncEngine *) syncEngine nextRecordZoneChangeBatchForContext:(CKSyncEngineSendChangesContext *) context;Parameters
- syncEngine:
The sync engine requesting changes.
- context:
The reason for the sync engine’s request, and any additional options that request is using.
Return Value
If there are pending record changes, a batch of those changes for the sync engine to process; otherwise, nil to indicate there are no changes to send.
Discussion
In your implementation, ask the sync engine’s state for any pending record zone changes and then return a change batch containing an instance of CKRecord for each record identifier the state provides. For both scheduled and manual send operations, the sync engine calls this method repeatedly until your app has no more changes and returns nil.