ios_catalogue1-5 Exercise 1: Navigate and Delete ================================================= Expected sequence: 1. Tap + : a sample item appears (temporary behaviour from Chapter 4). 2. Tap its row: the Details screen shows the title in large type, then Type "Book", Creator "Sample creator" and "Added" with today's date. Blank fields (format, year, tags, notes) are not shown. 3. Tap the back arrow: the list returns, the item still there. 4. Open it again, tap the bin: a sheet "Delete this item?" naming the item. Tap Cancel: the sheet closes and the item stays. 5. Tap the bin again, then Delete: the detail screen pops and the item is gone from the list. Things you may have had to change, and what Xcode says: "Type 'Item' does not conform to protocol 'Hashable'" Push item.persistentModelID instead: NavigationLink(value: item.persistentModelID) { ... } .navigationDestination(for: PersistentIdentifier.self) { id in if let item = context.model(for: id) as? Item { DetailView(item: item) } } (Careful: model(for:) can return an object even for an id that no longer exists; see Exercise 3.) "Value of type 'Item' has no member 'isDeleted'" Use another check, e.g. item.modelContext == nil, and note which one worked. Tapping a row does nothing The navigationDestination is not visible from the link: attach it to the VStack inside the NavigationStack, not inside the List or ForEach. Back button behaves oddly / double title bars DetailView has its own NavigationStack. Remove it. Crash on delete Read the console message and go to Exercise 3. Your own results will depend on your Xcode and iOS versions: record them.