Record Operations

Asynchronously fetch or modify records.

Topics

Fetching Records

One of the most common uses of CloudKit is to fetch records from the server to be used locally. If the database that your app is using has one or more record zone it is also useful to fetch the available record zones and/or the changes that exist in a particular record zone.

CKFetchRecordsOperation

An operation used to retrieve records from CloudKit.

CKFetchRecordZoneChangesOperation

An operation that fetches record changes across the given record zone.

CKFetchRecordZonesOperation

An operation used to retrieve zones from a database in CloudKit.

CKServerChangeToken

An object that identifies a specific version of a record.

Modifying Records

When a record or record zone has been changed locally, those changes need to be persisted back to CloudKit so that they can be shared with other devices and/or users.

CKModifyRecordsOperation

An operation that saves changes to one or more record objects.

CKModifyRecordZonesOperation

An operation that saves or deletes record zones.

Fetching Database Changes

In many situations it may be more efficient or useful to fetch all changes that have occurred within a database as opposed to updating records and/or zones individually.

CKFetchDatabaseChangesOperation

An operation that fetches changes to the database.

Grouping Operation Execution

When it is appropriate, CloudKit operations can be grouped together which assists in aligning operations with user interaction.

CKOperationGroup

An object that allows CloudKit operations to be grouped to align with user actions.

CKOperationConfiguration

A collection of properties that describes how a CloudKit operation should behave.

Deprecated Operations

Operations that should no longer be used.

CKFetchRecordChangesOperation

An operation that reports on the changed and deleted records in the specified record zone.

Deprecated

See Also

Records

CKRecord

A dictionary of key-value pairs that you use to fetch and save your app's data.

CKRecordZone

The definition of a custom area for organizing related records in a database.

CKReference

A reference used to create a many-to-one relationship between records in a database.

CKRecordValue

The protocol that provides strong type checking for objects that the CloudKit framework stores on the server.