<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSyncEngineDelegate-3c38p",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(pl)CKSyncEngineDelegate"
  },
  "title" : "CKSyncEngineDelegate"
}
-->

# CKSyncEngineDelegate

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

```
@protocol CKSyncEngineDelegate <NSObject>
```

## Overview> Important: ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngine-4b4w9`` 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-4b4w9/fetchChangesWithCompletionHandler:`` or ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngine-4b4w9/sendChangesWithCompletionHandler:`` from within ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngineDelegate-3c38p/syncEngine:handleEvent:``.

## Topics

### Handling sync events

[`syncEngine:handleEvent:`](/documentation/CloudKit/CKSyncEngineDelegate-3c38p/syncEngine:handleEvent:)

Tells the delegate to handle the specified sync event.

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

An event that occurs during a sync operation.

### Sending changes

[`syncEngine:nextRecordZoneChangeBatchForContext:`](/documentation/CloudKit/CKSyncEngineDelegate-3c38p/syncEngine:nextRecordZoneChangeBatchForContext:)

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

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

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

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

An object 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)