Instance Method


Initializes and returns an operation object configured to save and delete the specified records.


- (instancetype)initWithRecordsToSave:(NSArray<CKRecord *> *)records recordIDsToDelete:(NSArray<CKRecordID *> *)recordIDs;



An array of CKRecord objects representing the records to save, if any. You may specify nil for this parameter.


An array of CKRecordID objects representing the records you want to delete, if any. You may specify nil for this parameter.

Return Value

An initialized operation object.


The records you intend to save or delete must all reside in the same database, which you can specify when you configure the operation object. Saving a record that is not in the current database creates it in the database. Trying to delete a record that does not exist in the current database returns an error for that record.

See Also

Initializing the Operation Object

- init

Initializes and returns an operation object.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software