SwiftUI 2.0 CoreData issues with new project – ‘Cannot find type ‘Item’ in scope’

The normal Xcode clearing works for me:

  1. Clean build folder (SHIFT + COMMAND + K)

  2. Quit Xcode completely

  3. Delete the project’s contents in, DerivedData/{Project Name}_some_hash

    The default location is ~/Library/Developer/Xcode/DerivedData, but if it’s nowhere to be found, check the Derived Data property under, Xcode → Preferences → Locations

  4. Try again (run Xcode & build)

Leave a Comment