Chapter 10: Invalid Instructions

The chapter has a section called “Setting up your project” where it explains to create a brand new SwiftUI project.

After the initial setup instructions, it says to: " Now, open Persistence.swift and add the following line at the end…" - there is no such file called Persistence.swift since this is a new project.

Then about a paragraph later, it says, “To ensure there are no build errors and that the app launches, build and run in a simulator or a device.” but the project does not build due to some changes requested in the ContentView.swift file that causes errors: 1) Cannot find ‘items’ in scope, 2) Cannot find ‘deleteItems’ in scope, and 3) Cannot find ‘addItem’ in scope.

Instructions do not state where these properties or methods come from.

@jozemite_apps Thanks very much for your question!

Is it possible that you missed a step in creating this file in your original setup? Are you by any chance required to select the option to Include Core Data but forgot to check it at the beginning?

This topic was automatically closed after 166 days. New replies are no longer allowed.