Defining a data model with SwiftData – SwiftData Starter Project 2/8

Learn how to create your own SwiftData models using the @Model macro, then create a model container for that model so SwiftUI can work with it. You can find the completed source code here: https://github.com/twostraws/iTour This is an 8-part project that walks you through building a SwiftData project from scratch using SwiftUI. It's designed to work alongside my book SwiftData by Example, available at https://www.hackingwithswift.com/quic... This project is aimed at programmers who have some experience with Swift and SwiftUI already, and want to get up to speed with SwiftData as quickly as possible.