MENU

Fun & Interesting

WWDC24: What’s new in SwiftData | Apple

Apple Developer 11,376 10 months ago
Video Not Working? Fix It Now

SwiftData makes it easy to add persistence to your app with its expressive, declarative API. Learn about refinements to SwiftData, including compound uniqueness constraints, faster queries with #Index, queries in Xcode previews, and rich predicate expressions. Join us to explore how you can use all of these features to express richer models and improve performance in your app. To discover how to build a custom data store or use the history API in SwiftData, watch “Create a custom data store with SwiftData” and “Track model changes with SwiftData history”. Discuss this video on the Apple Developer Forums: https://developer.apple.com/forums/topics/programming-languages-topic?cid=yt-w-0011 Explore related documentation, sample code, and more: SwiftData: https://developer.apple.com/documentation/SwiftData Adopting SwiftData for a Core Data app: https://developer.apple.com/documentation/coredata/adopting_swiftdata_for_a_core_data_app Meet SwiftData: https://developer.apple.com/videos/play/wwdc2023/10187 Create a custom data store with SwiftData: https://developer.apple.com/videos/play/wwdc2024/10138 Track model changes with SwiftData history: https://developer.apple.com/videos/play/wwdc2024/10075 00:00 - Introduction 00:57 - Adopt SwiftData 02:11 - Customize the schema 02:43 - #Unique macro 03:37 - History API 04:29 - Tailor a model container 05:39 - Custom data stores 06:41 - Xcode previews 09:20 - Customize queries 10:18 - #Expression macro 11:56 - #Index macro More Apple Developer resources: Video sessions: https://apple.co/VideoSessions Documentation: https://apple.co/DeveloperDocs Forums: https://apple.co/DeveloperForums App: https://apple.co/DeveloperApp

Comment