Instance Property

perRecordProgressBlock

The block to execute with progress information for an individual record.

Declaration

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

Discussion

The block returns no value and takes the following parameters:

record

The CKRecord object that is in the process of being saved.

progress

The amount of progress toward saving the record, expressed as a percentage of its total size. This value is a number between 0.0 and 1.0, where 0.0 means none of the record is saved and 1.0 means the entire record has been saved.

The operation object executes this block zero or more times for each record in the recordsToSave 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. Use this block to track the ongoing progress of the upload operation and possibly to provide feedback to the user.

See Also

Processing the Operation Results

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

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

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

The block to execute after the status of all changes is known.