ios_catalogue1-2 Exercise 1: Build the Models ============================================== Files (in a Models group): ItemType.swift, Tag.swift, Item.swift (with the extension at the end, or in its own file). Typical results, and what they point to: "Invalid redeclaration of 'Item'" The wizard's own Item.swift still exists. Delete it (or replace its contents with the Item class from this chapter). "Cannot find 'Item' in scope" / "Cannot find 'Tag'" A file is not in the app target. Select it, open the File inspector and tick the Catalogue target. "Cannot find type 'Foundation'..." A missing "import Foundation" / "import SwiftData". "Cannot find 'type' in scope" at \Item.type The key path is wrong, or Item.swift has not been saved. Errors about @Relationship's arguments The macro's label names vary slightly by SwiftData version; use Xcode's completion on "@Relationship(" and compare. If the build succeeds: that proves only that the Swift compiles and the macros expand. SwiftData builds its schema when a ModelContainer is created at run time (Chapter 3). A relationship with a wrong or missing inverse, or an invalid delete rule, typically shows up THEN (a crash or a runtime error on launch or on first save), not at build time. This is the main difference from Room, which checks entities when you build. Your own list will differ with your Xcode version: the useful habit is mapping each message to a cause.