Based on Apple Sample Code Building a document-based app using SwiftData.
License, etc. are from Apple.
Goals:
- Make the app function as it should.
- Add previews to all views.
If you know how to solve a problm here, a pull request is appreciated. Otherwise I'll muddle!
- Note: This project requires the Xcode 15 beta and targets both macOS and iOS. If you're running the Xcode beta but not the macOS beta, you'll need to set your run destination to an iOS target (probably a simulator).
Code along with the WWDC presenter to transform an app with SwiftData.
Learn how to use @Query
, @Bindable
, .modelContainer
, the .modelContext
environment variable, and DocumentGroup
to integrate with the SwiftData
framework.
- Note: This sample code project is associated with WWDC23 session 10154: Build an app with SwiftData.