CKSyncEngine.Event.StateUpdate
The sync engine state was updated, and you should persist it locally.
Declaration
struct StateUpdateOverview
In order to function properly and efficiently, CKSyncEngine tracks some state internally. When the sync engine state changes, it gives you the latest serialized version in a CKSyncEngine.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 in alongside your own local data. The next time your process launches, use this latest state serialization in 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.