What is coredata
Asked on 06/02/2025
1 search
Core Data is a framework used by Apple to manage the model layer objects in applications. It provides generalized and automated solutions to common tasks associated with object life cycle and object graph management, including persistence. In the context of WWDC 2024, Core Data is mentioned as the default storage backend for Swift Data, a framework introduced to make it easier to build and persist your app's model layer across launches. Swift Data allows for the use of custom data stores, enabling developers to choose alternative backends like SQLite or JSON files, while still benefiting from Swift Data's API and features like history tracking.
For more details on how Swift Data interacts with Core Data and other storage options, you can refer to the session Platforms State of the Union (00:41:00).

Platforms State of the Union
Discover the newest advancements on Apple platforms.

Track model changes with SwiftData history
Reveal the history of your model’s changes with SwiftData! Use the history API to understand when data store changes occurred, and learn how to use this information to build features like remote server sync and out-of-process change handing in your app. We’ll also cover how you can build support for the history API into a custom data store.

What’s new in SwiftData
SwiftData makes it easy to add persistence to your app with its expressive, declarative API. Learn about refinements to SwiftData, including compound uniqueness constraints, faster queries with #Index, queries in Xcode previews, and rich predicate expressions. Join us to explore how you can use all of these features to express richer models and improve performance in your app. To discover how to build a custom data store or use the history API in SwiftData, watch “Create a custom data store with SwiftData” and “Track model changes with SwiftData history”.