Two years ago SwiftData was not production-ready for serious apps. Today it's the default in every new project we start. What changed — and what didn't?
When SwiftData was announced in 2023, we tried it, ripped it out cursing, and went back to Core Data. Migrations were broken, predicates inconsistent, threading a weekend crash course. For those listening: Apple kept iterating.
What we like today
- Schemas are actually Swift code. No more .xcdatamodeld, no click-through editor. The database is readable in the repo.
- Migrations are no longer broken — as long as you use
VersionedSchemafrom day one. - The integration with SwiftUI is exactly what Core Data never was: honestly usable.
- CloudKit sync costs two lines. That actually happened, not ironic.
What still hurts
Complex predicates. The moment you join a relation and filter by several conditions, the compiler blows up in your face. In those cases we fall back to a FetchDescriptor builder and write the predicate by hand.
// Does not work — generic compiler crash let p = #Predicate<Receipt> { r in r.client.taxNumber == taxNo && r.amount > min && r.tags.contains("travel") } // Instead: compiles, works, tested var desc = FetchDescriptor<Receipt>() desc.predicate = #Predicate { $0.amount > min } let all = try ctx.fetch(desc) return all.filter { $0.client.taxNumber == taxNo }
Ugly? A little. Works? In production at TaxCastle for two years, no single crash report because of this path.
We come from the school where every optimization has to be justified. And for apps under 50,000 active receipts per client, this "optimization" is money better spent elsewhere.Tilman, in a pull-request comment
Recommendation for 2026
If you're starting a new Apple app today and don't need to handle tens of thousands of records per second: SwiftData first. Only when a concrete performance profile shows it's not enough, fall back to GRDB or Core Data. We've done this in four projects in the last twelve months — no surprises. How we set up projects like these in general is on our app development page.