4 ms·
Isn't SwiftData mostly a wrapper around CoreData?
by akmarinov 3y ago
Isn't SwiftData mostly a wrapper around CoreData?
- koinedad 3y agoMost definitely
- akmarinov 3y agoThen there probably won't be a difference in performance
- favorited 3y agoThere certainly could be. SwiftData @Models aren't subclasses of NSManagedObject, and don't have to use the Objective-C runtime for dispatch, or the KVC-style property accessors that Core Data uses. The fact that it is built atop Core Data's persistent stores, cloud sync, etc. doesn't mean that it's a fascade in front of the Objective-C APIs.
- afinlayson 3y agoIt just makes it easier to use - meaning less glue code. Making CoreData Swift + SwiftUI native approach. Where currently you'd have to make a Core Data class wrapped by a @Observable Class.