Which data persists after app

Asked on 03/19/2025

1 search

In the context of Apple's WWDC sessions, data persistence in apps is primarily discussed in relation to SwiftData. SwiftData is a framework that facilitates the building of an app's model layer and ensures its persistence across app launches. This includes features like modeling, schema migration, graph management, and synchronization with CloudKit.

Persistent data in SwiftData is managed through a combination of model contexts and data stores. The data store is responsible for fetching and saving all the data required to support persistent models. SwiftData also supports history tracking, which allows apps to query and process changes over time, providing a way to track model changes and manage persistent history.

For more detailed information on how SwiftData handles data persistence, you can refer to the session What’s new in SwiftData (00:01:01) which covers the adoption of SwiftData and its persistence capabilities. Additionally, the session Create a custom data store with SwiftData (00:01:21) provides insights into how custom data stores can be implemented to manage persistent data.