---
title: stateSerialization
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/cksyncengine-5sie5/configuration/stateserialization
---

# stateSerialization

The sync engine’s serialized state.

## Declaration

```swift
var stateSerialization: CKSyncEngine.State.Serialization?
```

## Discussion

Discussion This property returns the value you specify for the initializer’s stateSerialization parameter. If you choose to set this property after initialization, assign the state from the most recent CKSyncEngine.Event.stateUpdate(_:) event handled by your delegate. However, if this is the first initialization of the associated sync engine, specify nil instead. The default value is nil.

## See Also

### Managing attributes

- [automaticallySync](cloudkit/cksyncengine-5sie5/configuration/automaticallysync.md)
- [database](cloudkit/cksyncengine-5sie5/configuration/database.md)
- [subscriptionID](cloudkit/cksyncengine-5sie5/configuration/subscriptionid.md)
