I had this problem after creating a new CoreData model version and immediately deleting it. The said version didn’t appear in Xcode’s Project Navigator but was causing the compilation error. I used the “Show in Finder” at one of the model versions and found the .mom file of the deleted model version. Manual deletion solved it for me.