Apple has introduced significant updates to its SwiftData framework as part of the 2027 release, adding support for persisting custom and third-party types through the Codable protocol. The update also enables developers to organize data into SwiftUI list sections and introduces new capabilities for observing changes in data stores.
The announcement, reported by Sergio De Simone, outlines key enhancements aimed at expanding the framework’s flexibility for iOS, macOS, watchOS, and tvOS developers. SwiftData, first introduced in 2023, serves as a persistent data storage framework designed to work seamlessly with SwiftUI.
Codable Support for Custom and Third-Party Types
A major addition in the 2027 release is the ability to persist custom data types and types from third-party libraries using Swift’s Codable protocol. Previously, SwiftData primarily supported native data types and required additional configuration for custom structures. This change allows developers to store complex objects directly without manual serialization code.
Codable, a protocol introduced in Swift 4, automates encoding and decoding of data types to and from external representations such as JSON or property lists. By extending this capability to SwiftData, Apple aims to reduce boilerplate code and improve interoperability with external APIs and libraries.
SwiftUI List Section Organization
Developers can now organize fetched data into SwiftUI list sections directly within SwiftData queries. This feature leverages SwiftData’s native query system to group results by specified criteria, enabling more structured and readable user interfaces without additional sorting or grouping logic in the view layer.
The update aligns SwiftData more closely with SwiftUI’s declarative approach, allowing developers to define section headers and data hierarchies at the data layer rather than within individual views. This can simplify code maintenance and improve consistency across applications.
Data Store Observation via ResultsObserver and HistoryObserver
The 2027 release introduces two new observers for monitoring data store changes: ResultsObserver and HistoryObserver. ResultsObserver allows applications to track changes to query results in real time, enabling automatic UI updates when underlying data is modified. HistoryObserver provides a mechanism to audit changes to the data store over time, recording insertions, updates, and deletions.
These observation tools are designed to replace or supplement existing manual change tracking methods. Apple’s documentation notes that HistoryObserver can be particularly useful for applications that require synchronization across devices or compliance with data audit trails.
Both observers integrate with SwiftData’s existing transaction system and do not require additional setup beyond specifying the types or predicates to observe. Developers can implement custom handlers to respond to specific change events, such as updating a cache or logging modifications.
Implications for the Development Community
The updates address long-standing community requests for greater flexibility in data modeling and more efficient state management within SwiftUI applications. By supporting external types and providing built-in observation tools, Apple is positioning SwiftData as a more comprehensive alternative to Core Data, especially for projects already using SwiftUI.
Industry analysts note that the Codable support could encourage adoption among developers who rely on third-party SDKs or who need to integrate SwiftData with existing Codable-based data pipelines. The new observers also reduce the need for Combine frameworks or custom notification systems for data-driven updates.
The 2027 release is expected to be part of the broader Xcode and platform updates scheduled for later this year. Developers can access beta versions through Apple’s developer program, with a production release anticipated alongside the next major operating system updates.







