---
title: CKSyncEngineDelegate
framework: cloudkit
role: symbol
role_heading: Protocol
path: cloudkit/cksyncenginedelegate-1q7g8
---

# CKSyncEngineDelegate

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

## Declaration

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

## Overview

Overview important: CKSyncEngine 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 fetchChanges(_:) or sendChanges(_:) from within handleEvent(_:syncEngine:).

## Topics

### Handling sync events

- [handleEvent(_:syncEngine:)](cloudkit/cksyncenginedelegate-1q7g8/handleevent(_:syncengine:).md)
- [CKSyncEngine.Event](cloudkit/cksyncengine-5sie5/event.md)
- [CKSyncEngineEventType](cloudkit/cksyncengineeventtype.md)

### Sending changes

- [nextRecordZoneChangeBatch(_:syncEngine:)](cloudkit/cksyncenginedelegate-1q7g8/nextrecordzonechangebatch(_:syncengine:).md)
- [CKSyncEngine.SendChangesContext](cloudkit/cksyncengine-5sie5/sendchangescontext.md)
- [CKSyncEngine.RecordZoneChangeBatch](cloudkit/cksyncengine-5sie5/recordzonechangebatch.md)

### Instance Methods

- [nextFetchChangesOptions(_:syncEngine:)](cloudkit/cksyncenginedelegate-1q7g8/nextfetchchangesoptions(_:syncengine:).md)

## Relationships

### Inherits From

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
