13.7 · Syncing data across devices: conflicts, tombstones and CloudKit

The moment data lives on two devices, every write can conflict with another. Sync is a design problem first, an API problem second.

Mental model. You need three answers up front: how to name a record (stable ids), how to know what changed (versions or timestamps) and what wins when both sides changed.

Sync

Identity, change tracking, conflict resolution and deletion.

  1. How would you design multi-device sync: identity, change tracking, conflict resolution, deletions and CloudKit? 13.7.1 · L8
    Sync is replicating state between devices that can change it offline and concurrently. Build it from four ideas. Stable identity: every record has a globally…

More in Persistence & data