Instance Property

recordZoneFetchCompletionBlock

The block to execute when the fetch for a zone has completed.

Declaration

var recordZoneFetchCompletionBlock: ((CKRecordZone.ID, CKServerChangeToken?, Data?, Bool, Error?) -> Void)? { get set }

Discussion

The block returns no value and takes the following parameters:

recordZoneID

The ID of the zone with the updated token.

serverChangeToken

The current server change token to be stored and used in subsequent CKFetchRecordZoneChangesOperation instances.

clientChangeTokenData

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.

moreComing

Indicates if this is the last record zone change. If fetchAllChanges is false, it is the responsibility of the client to create additional CKFetchRecordZoneChangesOperation instances for the additional changes.

recordZoneError

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

The client is responsible for saving the change token at the end of the operation and passing it into the next call to CKFetchRecordZoneChangesOperation. Each time the block is executed, it 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 it to a queue.

See Also

Processing the Operation Results

var fetchRecordZoneChangesCompletionBlock: ((Error?) -> Void)?

The block to use to process the record zone changes.

var recordChangedBlock: ((CKRecord) -> Void)?

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