How does state restoration work?
Generated on 8/2/2024
1 search
State restoration in the context of WWDC sessions can be understood through several different technologies and use cases:
-
Core Spotlight:
- Client State: Core Spotlight uses client state to manage a large catalog of items and maintain data integrity between your app and Spotlight. This helps prevent over-donation of items, which can impact performance. When Spotlight needs to migrate the index or recover from data corruption, it requests your app to re-index items, ensuring the searchable content stays up to date.
- Support semantic search with Core Spotlight (00:03:46)
-
Core ML:
- Stateful Models: Core ML now supports stateful models, which manage state tensors automatically. This is useful for models that need to keep track of historical inputs, such as accumulators. This reduces the overhead and improves inference efficiency, leading to faster prediction times.
- Bring your machine learning and AI models to Apple silicon (00:14:34)
- Deploy machine learning and AI models on-device with Core ML (00:10:22)
-
SwiftData:
- History Tokens: SwiftData uses history tokens to track changes in the data store. This allows apps to resume long-running queries between relaunches and eliminate duplicated events. The state is needed to uniquely identify your position in the stream of transactions.
- Track model changes with SwiftData history (00:01:13)
- Track model changes with SwiftData history (00:02:16)
-
Core Location:
- Session Lifecycle: Core Location keeps track of each outstanding API object and resumes or relaunches the app into the background when new information is ready for delivery. This ensures that the app can continue to act on location updates even if it was terminated.
- What’s new in location authorization (00:11:41)
- What’s new in location authorization (00:12:27)
These sessions provide a comprehensive overview of how state restoration is handled across different Apple technologies presented at WWDC.
Meet FinanceKit
Learn how FinanceKit lets your financial management apps seamlessly and securely share on-device data from Apple Cash, Apple Card, and more, with user consent and control. Find out how to request one-time and ongoing access to accounts, transactions, and balances — and how to build great experiences for iOS and iPadOS.
What’s new in location authorization
Location authorization is turning 2.0. Learn about new recommendations and techniques to get the authorization you need, and a new system of diagnostics that can let you know when an authorization goal can’t be met.
Bring your machine learning and AI models to Apple silicon
Learn how to optimize your machine learning and AI models to leverage the power of Apple silicon. Review model conversion workflows to prepare your models for on-device deployment. Understand model compression techniques that are compatible with Apple silicon, and at what stages in your model deployment workflow you can apply them. We’ll also explore the tradeoffs between storage size, latency, power usage and accuracy.
Create a custom data store with SwiftData
Combine the power of SwiftData’s expressive, declarative modeling API with your own persistence backend. Learn how to build a custom data store and explore how to progressively add persistence features in your app. To get the most out of this session, watch “Meet SwiftData” and “Model your schema with SwiftData” from WWDC23.
Support semantic search with Core Spotlight
Learn how to provide semantic search results in your app using Core Spotlight. Understand how to make your app’s content available in the user’s private, on-device index so people can search for items using natural language. We’ll also share how to optimize your app’s performance by scheduling indexing activities. To get the most out of this session, we recommend first checking out Core Spotlight documentation on the Apple Developer website.
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.
Deploy machine learning and AI models on-device with Core ML
Learn new ways to optimize speed and memory performance when you convert and run machine learning and AI models through Core ML. We’ll cover new options for model representations, performance insights, execution, and model stitching which can be used together to create compelling and private on-device experiences.