<!--
{
  "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/Event",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:8CloudKit12CKSyncEngineC5EventO"
  },
  "title" : "CKSyncEngine.Event"
}
-->

# CKSyncEngine.Event

Describes an event that occurs during a sync operation.

```
enum Event
```

## Overview

While syncing, [`CKSyncEngine`](/documentation/CloudKit/CKSyncEngine-5sie5) posts several different types of events.
Each event has an associated struct value with details describing the nature of the event.

See the documentation for each event struct for more details about when and why an event is posted.

> Important: You don’t create instances of this type manually. Instead, the sync engine provides them to your app’s delegate during sync operations.

## Topics

### Account changes

[`case accountChange(CKSyncEngine.Event.AccountChange)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/accountChange(_:))

The user signed in or out of their account.

[`struct AccountChange`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/AccountChange)

The user signed in or out of their account.

### Remote database changes

[`case willFetchChanges(CKSyncEngine.Event.WillFetchChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/willFetchChanges(_:))

The sync engine is about to fetch changes from the server.

[`struct WillFetchChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/WillFetchChanges)

The sync engine is about to fetch changes from the server.

[`case fetchedDatabaseChanges(CKSyncEngine.Event.FetchedDatabaseChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/fetchedDatabaseChanges(_:))

The sync engine has fetched new database changes from the server.

[`struct FetchedDatabaseChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/FetchedDatabaseChanges)

A type that provides information about fetched database changes.

[`case didFetchChanges(CKSyncEngine.Event.DidFetchChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/didFetchChanges(_:))

The sync engine finished fetching changes from the server.

[`struct DidFetchChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/DidFetchChanges)

A type that provides information about a finished database fetch.

### Remote record zone changes

[`case willFetchRecordZoneChanges(CKSyncEngine.Event.WillFetchRecordZoneChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/willFetchRecordZoneChanges(_:))

The sync engine is about to fetch record zone changes from the server for a specific zone.

[`struct WillFetchRecordZoneChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/WillFetchRecordZoneChanges)

A type that provides information about an imminent fetch of changes in a record zone.

[`case fetchedRecordZoneChanges(CKSyncEngine.Event.FetchedRecordZoneChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/fetchedRecordZoneChanges(_:))

The sync engine fetched new record zone changes from the server.

[`struct FetchedRecordZoneChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/FetchedRecordZoneChanges)

A type that provides information about fetched record zone changes.

[`case didFetchRecordZoneChanges(CKSyncEngine.Event.DidFetchRecordZoneChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/didFetchRecordZoneChanges(_:))

The sync engine has completed fetching record zone changes from the server for a specific zone.

[`struct DidFetchRecordZoneChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/DidFetchRecordZoneChanges)

A type that provides information about a finished record zone fetch.

### Pending local changes

[`case willSendChanges(CKSyncEngine.Event.WillSendChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/willSendChanges(_:))

The sync engine is about to send changes to the server.

[`struct WillSendChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/WillSendChanges)

A type that provides information about an imminent send of local changes.

[`case sentDatabaseChanges(CKSyncEngine.Event.SentDatabaseChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/sentDatabaseChanges(_:))

The sync engine sent a batch of database changes to the server.

[`struct SentDatabaseChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/SentDatabaseChanges)

A type that provides information about a sent batch of database changes.

[`case sentRecordZoneChanges(CKSyncEngine.Event.SentRecordZoneChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/sentRecordZoneChanges(_:))

The sync engine sent a batch of record zone changes to the server.

[`struct SentRecordZoneChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/SentRecordZoneChanges)

The sync engine finished sending a batch of record zone changes to the server.

[`case didSendChanges(CKSyncEngine.Event.DidSendChanges)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/didSendChanges(_:))

The sync engine finished sending changes to the server.

[`struct DidSendChanges`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/DidSendChanges)

A type that provides information about a finished send operation.

### State updates

[`case stateUpdate(CKSyncEngine.Event.StateUpdate)`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/stateUpdate(_:))

The sync engine updated its state.

[`struct StateUpdate`](/documentation/CloudKit/CKSyncEngine-5sie5/Event/StateUpdate)

The sync engine state was updated, and you should persist it locally.

### Debugging the event

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

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

### Default Implementations

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

## Relationships

### Conforms To

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

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

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

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

[`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)