I got completely stuck with Problem 4 and none of the above worked for me. I use code generation. To resolve it I did the following steps:
- I opened the .xcdatamodel / content file in a text editor. (In Xcode right-click your .xcdatamodel and choose "Open in external editor"
- In the XML file I made sure that each entity has
codeGenerationType="class"
- Close and reopened Xcode Cleared my derrived data folder
- It still refused to do the Code Generation, so I then generated each Entity manually (Editor, Create NSManageObject Subclasses, select all entities)
- Build the project. Now it also did the Code Generation and compiler errors appeared saying that the Entity filenames were used twice.
- Deleted the Manually created NSManagedObject subclasses created in step 5.
- After that the project built again successfully and the problem disappeared.
PS: If you choose to Manually create your NSManageObject subclasses rather then using Code Generation, then make sure you remove codeGenerationType="class"
from your entities in the XML file in step 2.