// the find
ryanashcraft/CloudSyncSession
Swift package that makes it easier to write CloudKit sync-enabled, offline-capable apps
CloudSyncSession is a Swift package that provides the sync engine logic for CloudKit-backed apps — fetching, modifying, retrying, and conflict-resolving — without touching disk itself. It's aimed at iOS/macOS developers who want CloudKit private-database sync but don't want to adopt NSPersistentCloudKitContainer or tie themselves to Core Data.
The persistence-free design is the real selling point: it only orchestrates CKRecord fetch/modify operations and lets you plug in whatever storage you already use (GRDB, Core Data, flat files). The event-based, Redux-influenced architecture with composable middleware (SplittingMiddleware for CloudKit batch limits, RetryMiddleware with backoff, ErrorMiddleware mapping CKError to events) is a genuinely clean way to model what is normally tangled, stateful CloudKit code. OperationHandler is abstracted behind a protocol, so the state machine has real unit test coverage (CloudSyncSessionTests, SyncStateTests) without needing a live iCloud account, which most CloudKit libraries skip entirely.
No shared records, assets, public database, or CKRecord references support — the author admits these are untested, which rules the library out for a lot of real-world CloudKit apps (sharing is a common reason to reach for CloudKit at all). It's explicitly a single-maintainer project that states it won't take large refactors or scope expansion, so don't expect feature growth or fast turnaround on edge-case bugs. There's no example app in the repo, just README snippets, so wiring up change-token persistence and CKRecord conversion correctly is entirely on you and easy to get wrong the first time. At 355 stars and infrequent releases, you're taking on real maintenance risk if the author moves on.