One Logo Pool Ball
CloudKit · IOS API REFERENCE

CKSyncEngine.Event.StateUpdate

struct · iOS 17.0+ · SDK 27.1

struct StateUpdate

The sync engine state was updated, and you should persist it locally. In order to function properly and efficiently, ``CKSyncEngine-5sie5`` tracks some state internally. When the sync engine state changes, it gives you the latest serialized version in a ``CKSyncEngine-5sie5/Event/StateUpdate`` event. This event happens occasionally when the sync engine modifies the state internally during normal sync operation. This event also happens when you change the state yourself. The sync engine does not persist this state to disk, so you need to persist it alongside your own local data. The next time your process launches, use this latest state serialization in ``CKSyncEngine-5sie5/Configuration/stateSerialization`` to initialize your sync engine. This state is directly tied to the changes you fetch and send with the sync engine. You should persist this state alongside any changes fetched prior to receiving this state.

Members (2)

get · iOS 17.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual description of the event that's suitable for logging.

get · iOS 17.0+

stateSerialization

TypeScript
get stateSerialization(): CKSyncEngine_State_Serialization
Swift declaration
let stateSerialization: CKSyncEngine.State.Serialization

The current state of the sync engine. - Important: Always persist the most recent state to disk alongside your app data. The sync engine requires you to provide it with the most recent serialized state at initialization, and it's your responsibility to make sure the state is available across app launches.

Skipped declarations

No declarations were skipped in this snapshot.

All CloudKit types →