Why I chose SwiftData over Core Data for SnapSilo (and the one thing I regret)
When I started SnapSilo I had to pick a persistence layer. CoreData is battle-tested, has years of Stack Overflow answers, and works well. SwiftData is newer, has better Swift integration, but has less documentation and some rough edges.
I went with SwiftData. Here's the reasoning and what I'd change.
Why SwiftData:
The @Model macro and @Query property wrapper are genuinely nicer to work with than NSManagedObject and NSFetchedResultsController. For a SwiftUI app, it feels like it was designed for this exact context. Less boilerplate, better integration with the view layer.
The performance for SnapSilo's use case (a few hundred to a few thousand records, mostly reads) is fine. I haven't hit any limits there.
What went wrong:
Migration. As I wrote about earlier this week, adding a non-optional property to a live model without a default value silently makes existing records inaccessible. Core Data would have thrown an error or required an explicit migration step. SwiftData just... quietly drops the rows.
There's also less documentation and fewer battle-tested patterns. When something breaks at 2am, "check the forum post from 2009 that solved this exact problem" is a resource CoreData has and SwiftData doesn't yet.
The one thing I'm still not sure about:
Complex predicates. For most queries, SwiftData works fine. But when I need to express something like "all records where field A matches X OR field B contains Y AND field C is not null" - the predicate API gets awkward. Core Data's NSPredicate handles this naturally. SwiftData's type-safe approach is cleaner for simple cases but occasionally fights you on complex ones.
Would I pick it again?
For a greenfield SwiftUI-first iOS app: yes. The ergonomics are better. Just go in knowing the migration story is fragile and documentation is sparse.
Happy to answer questions about the implementation.