Contents

recordFetchedBlock

The closure to execute when a record becomes available.

Declaration

var recordFetchedBlock: ((CKRecord) -> Void)? { get set }

Discussion

The closure returns no value and takes the following parameter:

  • A single record that matches the search criteria.

After identifying and sorting the records, the query operation executes this closure once for each of the result’s records. The closure executes serially with respect to all other closures of the operation, so you can expect only one closure at a time to execute for this operation.

Set the property’s value before you execute the operation or submit it to a queue.

See Also

Processing the Query Results