SwiftData has revamped the mechanism for creating data models, incorporating a type-safe mode for predicate creation based on model code. As a result, developers encounter numerous operations involving optional values when constructing predicates for SwiftData. This article will explore some techniques and considerations for handling optional values while building predicates.
In previous two articles, "Mastering Relationships in Core Data - Fundamentals" and "Mastering Relationships in Core Data - Practical Application", we explored in detail the concepts and techniques of relationships in Core Data. While much of this knowledge is also applicable to SwiftData, Core Data's successor, SwiftData introduces several significant changes in handling relationships. This article focuses on the changes that have occurred in the aspect of relationships within SwiftData, as well as the potential challenges and noteworthy details arising from these changes.
This article will explain how to observe specific data changes through Persistent History Tracking in SwiftData.
As the successor to Core Data, SwiftData provides a more elegant and secure mechanism for concurrent programming. This article will introduce how SwiftData addresses these issues and offers developers a better experience with concurrent programming.
This article will explore how SwiftData creates data models using code, the new language features it uses, and show how to create PersistentModel by declaring code.
This article will discuss how developers can call the advanced features provided by Core Data in SwiftData without using the Core Data stack, in order to extend the current capabilities of SwiftData.
WWDC 2023 is in full swing. Apple has not only introduced new hardware products but has also launched several quite shocking new frameworks. This article will discuss my initial impressions of SwiftUI 5.0 and SwiftData at this year's WWDC.