Instance Property


The block to execute when all changes have been reported.


@property(nonatomic, copy, nullable) void (^fetchRecordChangesCompletionBlock)(CKServerChangeToken *serverChangeToken, NSData *clientChangeTokenData, NSError *operationError);


The block returns no value and takes the following parameters:


The new change token from the server. You can store this token locally and use it during subsequent fetch operations to limit the results to records that changed since this operation executed.


The last client change token received from this device. If this change token is not the last change token you provided, the server may not have received the associated changes.


An error object containing information about a problem, or nil if the changes are retrieved successfully.

Your implementation of this block should check the moreComing property of the operation object to ensure that the server was able to deliver all results. If that property is set to YES, you must create another operation object (using the value in the serverChangeToken parameter) to fetch any remaining changes.

The operation object executes this block only once, at the conclusion of the operation. It is executed after all individual change blocks but before the operation’s completion block. The block is executed serially with respect to the other progress blocks of the operation.

If you intend to use this block to process results, set it before executing the operation or submitting the operation object to a queue.

See Also

Processing the Operation Results


The block to execute with the contents of a changed record.


The block to execute with the ID of a record that was deleted.


A Boolean value indicating that more results are available.