Observer
Asked on 06/16/2025
1 search
The concept of "Observer" is discussed in several sessions at WWDC 2025, particularly in the context of Swift and SwiftUI. Here are some highlights:
-
Swift Observation Library: In the session What’s new in Swift, the Observation Library is introduced, which provides general-purpose APIs for automatically tracking state changes in an object graph. This is based on a more general observer pattern, allowing you to opt a class into observation tracking using the observable macro.
-
SwiftUI and RealityKit: In the session Better together: SwiftUI and RealityKit, entities in Vision OS 26 are now observable, allowing them to notify other code when their properties change. This session discusses how to observe properties directly using SwiftUI's built-in observation tracking.
-
UIKit Automatic Observation Tracking: The session What’s new in UIKit covers automatic observation tracking in UIKit, which simplifies keeping UI components in sync with model changes without extra code.
-
HealthKit Medications API: In the session Meet the HealthKit Medications API, anchored object queries are discussed as a more efficient alternative to paired observer queries and sample queries for keeping app data up to date.
These sessions highlight the integration of observer patterns and observation tracking across different Apple frameworks, enhancing the ability to react to state changes efficiently.

What’s new in Swift
Join us for an update on Swift. We’ll talk about workflow improvements that make you more productive, and new and modernized library APIs for fundamental programming tasks. We’ll show examples of Swift adoption throughout more layers of the software stack. Finally, we’ll explore new language features for both improving approachability of concurrency, and achieving peak performance when you need it.

Meet WebKit for SwiftUI
Discover how you can use WebKit to effortlessly integrate web content into your SwiftUI apps. Learn how to load and display web content, communicate with webpages, and more.

SwiftData: Dive into inheritance and schema migration
Discover how to use class inheritance to model your data. Learn how to optimize queries and seamlessly migrate your app’s data to use inheritance. Explore subclassing for building model graphs, crafting efficient fetches and queries, and implementing robust schema migrations. Understand how to use Observable and persistent history for efficient change tracking.