35 failures in 7 groups
Every way sync breaks,
tested.
Each failure runs against every mix of devices, hundreds of times a night with different timing, and ends with a check of what has to be true. The first version is being built and proven on Pikos, a notes, tasks and calendar app that syncs through iCloud.
Many devices
Not two test phones: every mix of devices a real user owns, making changes at once.
| Failure | What must hold afterwards |
|---|---|
| Two to eight devices editing at once | Every device ends with the same data |
| iPhone, iPad, Mac, Watch and Vision Pro together | Each platform's quirks, like background limits, still converge |
| A device offline for a week, then back | It catches up, and sends what it held |
| A brand-new device joining an old account | It downloads everything, and the time it takes is measured |
| Clocks that disagree by minutes | The order of edits comes from sync, not from a wrong clock |
Conflicts
The same data changed in two places before either heard about the other.
| Failure | What must hold afterwards |
|---|---|
| Two devices edit the same record | Both edits merge, field by field, and neither is silently lost |
| Two devices edit the same field | One rule decides the winner, the same way on every device |
| One device deletes what another edits | Delete-or-keep is decided once, with no record coming back from the dead |
| Edits to an item that was moved or reordered | The edit follows the item, and the order converges |
| A parent deleted while a child is added | No orphan is left behind on any device |
Shared data and multiple users
A record shared with other people, who edit it from their own Apple IDs.
| Failure | What must hold afterwards |
|---|---|
| Owner and participant edit the same shared note | Both see both edits, from their own accounts |
| A participant's access is removed mid-edit | Their pending change is refused, and their copy is removed |
| A participant leaves the share | The owner keeps everything; the participant keeps nothing |
| A share accepted on a second device | It appears there too, without a duplicate |
| Read-only participants try to write | The write is refused on the device, before iCloud refuses it |
Accounts
The Apple ID under the app changes, or stops being there.
| Failure | What must hold afterwards |
|---|---|
| Signed out in the middle of a sync | Nothing is sent to the wrong account, and the app says why sync stopped |
| Another Apple ID signed in | Nothing merges across accounts |
| iCloud switched off for the app | Local data is kept, and sync resumes cleanly when it's back |
| Advanced Data Protection keys resetCKSyncEngine | The encrypted zone is rebuilt from what the devices hold |
Network and iCloud limits
iCloud refusing, slowing or losing the connection, the ways it does in production.
| Failure | What must hold afterwards |
|---|---|
| iCloud fullCKSyncEngine | Nothing is dropped, and sending resumes when space returns |
| Rate limited, with a retry-afterCKSyncEngine | Nothing is sent before the retry-after |
| A batch partly failsCKSyncEngine | Only the failed records are retried |
| A batch too large to send | It's split, and every record still arrives once |
| The network drops and returns, over and over | No change is lost, and none is sent twice |
| A record too big to save in one piece | It's stored as an asset or chunks, and arrives whole |
The app's own life
Things iOS and macOS do to an app while it's syncing.
| Failure | What must hold afterwards |
|---|---|
| App killed mid-send | No change is lost, and none is sent twice |
| Suspended in the background for hours | It picks up where it left off |
| A silent push never arrives | The next fetch catches up anyway |
| The device's own storage is full | Sync pauses and says why, and nothing is half-written |
Schema and app versions
Different versions of your app, and a schema in Production that can only grow.
| Failure | What must hold afterwards |
|---|---|
| A field the build saves isn't in Production | The schema check fails the build before it ships |
| An old app version meets data from a new one | It keeps what it doesn't understand, and saves nothing over it |
| A user skips three versions | Their data migrates, step by step, with nothing lost |
| Change token expiredCKSyncEngine | A full refetch, ending with the same data |
| A new install replays years of deletes | It converges, and the time it takes is measured |
| A zone deleted, purged or reset | Each reason is handled, and nothing comes back from the dead |
What works with what
The fast runs swap your app's sync engine for a fake iCloud inside one test process. CKSyncEngine, and libraries built on it like SQLiteData, can be swapped. SwiftData and Core Data run their sync inside Apple's framework, which can't be, so failures iCloud itself has to cause are marked CKSyncEngine above.
| CKSyncEngine | SwiftData, Core Data | |
|---|---|---|
| Schema check, inspector, compare | yes | yes |
| Devices, conflicts, sharing, accounts | fast, in one process | nightly, on simulators |
| iCloud full, rate limits, expired tokens | yes | not possible |
How a run works
Simulated devices make random edits through your app's own sync code, against a stand-in for iCloud that fails the way the real one does. Each run has a seed, so any failure can be replayed exactly, step by step, in the inspector. A scripted check against your real staging container catches what a stand-in can't.
Want this for your app?
Two emails at most: when the free schema check ships, and when the app does. Or explore the demo →
Two emails at most: when the free schema check ships, and when the app does. Unsubscribe in one click.
You're on the list. You'll hear when the schema check ships, and when the app does.
Optional: what does your app sync with?