Instance Property

perRecordProgressBlock

The block to execute with progress information for individual records.

Declaration

var perRecordProgressBlock: ((CKRecord.ID, Double) -> Void)? { get set }

Discussion

The block returns no value and takes the following parameters:

recordID

The ID of the record that is being retrieved.

progress

The amount of the record that has been downloaded, represented as a percentage of the total. The range of this value is 0.0 to 1.0, where 0.0 means nothing has been downloaded, and 1.0 means the download is complete.

The operation object executes this block zero or more times 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. You can use this block to track the ongoing progress of the download operation and possibly to provide feedback to the user.

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

var perRecordCompletionBlock: ((CKRecord?, CKRecord.ID?, Error?) -> Void)?

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

var fetchRecordsCompletionBlock: (([CKRecord.ID : CKRecord]?, Error?) -> Void)?

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