Instance Property

atomic

A Boolean value indicating whether the entire operation fails when one or more records in the same zone cannot be written.

Declaration

@property(nonatomic, assign) BOOL atomic;

Discussion

Modifying records atomically prevents you from updating your data in a way that would leave it in an inconsistent state. You use atomic updates when you want to write multiple records to the same record zone. If there is a failure to modify any of the records in a particular zone, no changes are made to the other records in that same zone. The zone itself must have the CKRecordZoneCapabilityAtomic capability for this behavior to apply. If a record zone does not support the atomic capability, setting this property has no effect.

The default value of this property is YES, which causes all modifications within a single record zone to be made atomically. If your operation object contains records in multiple record zones, a failure in one zone does not prevent modifications to records in a different zone. Changing the value of this property to NO causes the records to be modified individually, regardless of whether the record zone supports atomic modifications.

See Also

Configuring the Operation Object

recordsToSave

The records to save to the database.

recordIDsToDelete

The IDs of the records to delete permanently from the database.

savePolicy

The policy to apply when the server contains a newer version of a specific record.

clientChangeTokenData

A data token used to track client-side changes to records.

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