The block to execute after the status of all changes is known.
- iOS 8.0+
- macOS 10.10+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 3.0+
The block returns no value and takes the following parameters:
The array of
CKRecordobjects you tried to save.
The array of
CKRecordobjects corresponding to the records you tried to delete.
An error object containing information about a problem, or
nilif the results are saved successfully.
This block is executed only once and represents your last chance to process the operation results. It is executed after all individual progress blocks have completed but before the operation’s completion block. The block 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.
This block reports an error of type
CKError when it saves or deletes only some of the records successfully. The
user dictionary of the error contains a
CKPartial key whose value is an
NSDictionary object. The keys of that dictionary are the IDs of the records that were not saved or deleted, and the corresponding values are error objects containing information about what happened.
While this block is executed after the completion of the modification of records, it is executed prior to the indexing of queries against those modified records. Therefore, if a query is executed in this completion block the results of that query may not include the changes made by this operation. Conversely, records that are fetched in this completion block will be up to date with the changes made in the associated operation.