Instance Property

perRecordCompletionBlock

The block to execute when the results of a single record are available.

Declaration

@property(nonatomic, copy, nullable) void (^perRecordCompletionBlock)(CKRecord *record, CKRecordID *recordID, NSError *error);

Discussion

The block returns no value and takes the following parameters:

record

The retrieved record, or nil if the specified record cannot be retrieved.

recordID

The ID of the record. This value corresponds to one of the IDs you specified in the recordIDs property.

error

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

The operation object executes this block once for each record ID in the recordIDs property. 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 the operation object to a queue.

See Also

Processing the Operation Results

perRecordProgressBlock

The block to execute with progress information for individual records.

fetchRecordsCompletionBlock

The block to execute after all records are fetched or have received appropriate errors.