Could not determine generated file paths for CoreData code generation

In My Case it was a result of Model.xcdatamodeld having conflicts when Merged with Remote (Source or Head). Somehow this conflict wasn't detected by GIT and slid through as Conflict Free.

Resolution: Open Model.xcdatamodeld as xml (with textEditor) and search for conflicts (>>>). Fix conflict and Save.


In Xcode, select your Model.xcdatamodeld model and tick the checkbox "Target Membership" for your new target in the Inspector.


Similar to shallowThought's answer, I found I had to first uncheck the target, and then re-check it, and then re-build.