SwiftData in WWDC2025
Asked on 06/12/2025
1 search
At WWDC 2025, SwiftData was highlighted in the session titled "SwiftData: Dive into inheritance and schema migration." This session introduced new features and improvements to SwiftData, including:
-
Class Inheritance: New in iOS 26, SwiftData now supports class inheritance, allowing developers to build a model graph that harnesses inheritance. This is particularly useful when your models form a natural hierarchy and share characteristics. For example, in the Trips app, the Trip model can have subclasses that inherit properties like destination, start date, and end date.
-
Schema Migration: The session also covered strategies for evolving data with migration, ensuring that data is preserved as the schema changes over time.
-
Performance Optimization: Techniques for tailoring fetched data and observing changes to data were discussed to optimize performance.
For more detailed information, you can watch the session SwiftData: Dive into inheritance and schema migration.
Additionally, the "Platforms State of the Union" session mentioned improvements to SwiftData, including model subclassing, entity inheritance, and support for additional common data types like AttributedString
. These enhancements make SwiftData more flexible and powerful for developers working across Apple's platforms.

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.

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

Keynote
Don’t miss the exciting reveal of the latest Apple software and technologies.