Ensembles 3
Drew McCormack (February):
Had my Core Data sync framework, Ensembles, pretty much in maintenance mode. With Apple moving on to SwiftData, didn’t seem any point to modernizing the 15 year old ObjC codebase. But I had the thought to give Claude a shot at it, and in 2 days I’ve got a complete port: Swift 6, structured concurrency instead of OperationQueue. Even adding a bunch of new backends (Box, pCloud, S3). Will make it available as Ensembles 3 to subscribers soon.
The core idea behind Ensembles is that sync doesn’t need a central server. Each device keeps its own copy of the Core Data store. The framework watches your saves, generates compact change logs, and when changes arrive from another device, it merges them in. There’s no server that understands your data model. No hosting costs. Each device is an equal peer.
[…]
More recently, the web community has started to embrace this approach and given it a name: local-first. I attended the inaugural Local-First Conf in Berlin in 2024, and gave a short talk about my journey with Ensembles — at that point more than 10 years old. It was good to see so much energy around ideas that some of us had relied on for a long time.
[…]
One thing that made this feasible: Ensembles had extensive tests. Without those, I wouldn’t have attempted it. When you’re rewriting a sync framework — where bugs mean data loss — you need to know things actually work. The tests were the safety net. Claude Code would produce Swift code, the tests would catch problems, and I’d fix things up. Without that feedback loop, this would have been reckless.
Ensembles is the only local-first sync framework for Core Data and SwiftData. Unlike most sync frameworks, it requires no custom server — your data syncs as opaque files through storage your users already have: CloudKit, Google Drive, OneDrive, WebDAV, or any custom backend.
[…]
Ensembles 3 is a modern rewrite of the Ensembles Objective-C framework in pure Swift, with async/await concurrency and Swift Package Manager distribution. It is fully backward compatible with Ensembles 2 cloud data.
[…]
No vendor can inspect, lock, or hold your data hostage.
Unlike Apple’s own CloudKit-based solutions:
Full Core Data fidelity — ordered relationships work. Validation rules preserved. No model compromises required.
The tradeoff is that your objects don’t really live in the cloud where they can be searched or fetched on-demand. The cloud is treated as dumb storage, and you have to pull down a full local copy before you can really do anything.
The CloudKit backend is free. It’s $99/year for additional backends and encryption or $499/year for full source access and code-level support.
Previously:
- Greg Knauss Is Losing Himself
- CoreDataEvolution
- Swift Server Powers Things Cloud
- SwiftData
- Syncing Core Data With CloudKit and NSPersistentCloudKitContainer
- The Deprecation of iCloud Core Data
- Core Data Ensembles