I'm new to Core Data, and everything is working very fine so far. However, there is something wrong with my workflow, and I would like to hear your advise on this.
After having added a new entity to my CoreData model, I select "Create NSManagedObject Subclass..." from the Editor Menu. I keep on hitting the "Next.." buttons, until the subclasses appear in my Navigator.
At that point, the project doesn't compile, and I have to go to myTarget>Build Phases>Compile Sources to delete the freshly added classes.m files.
What am I doing wrong?
Second Question, same topic, and likely related: If I add a new attribute to my entity, I delete the existing subclasses from my navigator, and re-generate them(and run into above problem again). I'm sure this can be done more efficiently.
Thanks for your insights.
Reason: In 8.0 or later versions, Xcode will produce subclass files automatically. You don't need to create it by yourself. If you really want to do that, following the steps below.
1.Select the Entity.
2.Go to Data Model Inspector
(tap the blue button, the same at the top of the following image)
3.Change Codegen
to Manual/None
.