New in coreData
Asked on 2025-08-04
1 search
At WWDC 2024, several sessions introduced new features and improvements related to CoreData and its integration with SwiftData. Here are some key highlights:
-
SwiftData History: SwiftData now provides a history API that allows you to track changes to your app's models. This is particularly useful for apps that need to sync local changes with a remote web service. You can migrate from CoreData's persistent history to SwiftData history, which offers a more streamlined approach to tracking changes. For more details, you can refer to the session Track model changes with SwiftData history.
-
Custom Data Stores: SwiftData now supports custom data stores, allowing you to use alternative backends like SQLite, a remote web service, or even a collection of JSON files. This flexibility enables you to use SwiftData's API with various storage formats. More information can be found in the session What’s new in SwiftData.
-
Schema Customization and Indexing: SwiftData introduces new macros for schema customization, including the index macro, which improves query performance by indexing frequently queried properties. This is particularly beneficial for large datasets. You can learn more about these features in the session What’s new in SwiftData.
These enhancements make it easier to manage and persist data across Apple's platforms, providing developers with more tools to optimize their apps' data handling capabilities.

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.

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

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”.