<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSyncEngine-5sie5/Configuration",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:8CloudKit12CKSyncEngineC13ConfigurationV"
  },
  "title" : "CKSyncEngine.Configuration"
}
-->

# CKSyncEngine.Configuration

A type that configures the attributes and behavior of a sync engine.

```
struct Configuration
```

## Topics

### Creating configurations

[`init(database: CKDatabase, stateSerialization: CKSyncEngine.State.Serialization?, delegate: any CKSyncEngineDelegate)`](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/init(database:stateSerialization:delegate:))

Creates a configuration for the specified database and serialized state.

### Handling record changes

[`var delegate: any CKSyncEngineDelegate`](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/delegate)

The object that provides the records to sync and handles any related events.

[`protocol CKSyncEngineDelegate`](/documentation/CloudKit/CKSyncEngineDelegate-1q7g8)

An interface for providing record data to a sync engine and customizing that engine’s behavior.

### Managing attributes

[`var automaticallySync: Bool`](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/automaticallySync)

A Boolean value that determines whether the engine syncs automatically.

[`var database: CKDatabase`](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/database)

The associated database.

[`var subscriptionID: CKSubscription.ID?`](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/subscriptionID)

The subscription identifier for the associated database.

[`var stateSerialization: CKSyncEngine.State.Serialization?`](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/stateSerialization)

The sync engine’s serialized state.

### Debugging the configuration

[`var description: String`](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/description)

A textual description of the configuration that’s suitable for logging.

### Default Implementations

[CustomStringConvertible Implementations](/documentation/CloudKit/CKSyncEngine-5sie5/Configuration/CustomStringConvertible-Implementations)

## Relationships

### Conforms To

[`Escapable`](/documentation/Swift/Escapable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Copyable`](/documentation/Swift/Copyable)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)