<!--
{
  "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/CKSyncEngineDelegate-1q7g8",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:8CloudKit20CKSyncEngineDelegateP"
  },
  "title" : "CKSyncEngineDelegate"
}
-->

# CKSyncEngineDelegate

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

```
protocol CKSyncEngineDelegate : AnyObject, Sendable
```

## Overview> Important: ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngine-5sie5`` delivers events serially, which means the delegate doesn’t receive the next event until it finishes handling the current one.
> To maintain this ordering, don’t call sync engine methods from your delegate that may cause the engine to generate additional events.
> For example, don’t invoke ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngine-5sie5/fetchChanges(_:)`` or ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngine-5sie5/sendChanges(_:)`` from within ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngineDelegate-1q7g8/handleEvent(_:syncEngine:)``.

## Topics

### Handling sync events

[`handleEvent(_:syncEngine:)`](/documentation/CloudKit/CKSyncEngineDelegate-1q7g8/handleEvent(_:syncEngine:))

Tells the delegate to handle the specified sync event.

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

Describes an event that occurs during a sync operation.

[`CKSyncEngineEventType`](/documentation/CloudKit/CKSyncEngineEventType)

Describes an event that occurs during a sync operation.

### Sending changes

[`nextRecordZoneChangeBatch(_:syncEngine:)`](/documentation/CloudKit/CKSyncEngineDelegate-1q7g8/nextRecordZoneChangeBatch(_:syncEngine:))

Asks the delegate to provide the next set of record changes to send to the server.

[`CKSyncEngine.SendChangesContext`](/documentation/CloudKit/CKSyncEngine-5sie5/SendChangesContext)

The context of an attempt to send changes to the server.

[`CKSyncEngine.RecordZoneChangeBatch`](/documentation/CloudKit/CKSyncEngine-5sie5/RecordZoneChangeBatch)

A type that contains the record changes for a single send operation.



---

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)