I created a data model in Xcode with about 9 entities, all of which are connected via relationships to a single ‘core’ entity.
Once I set this data model up graphically using the “Graph Editor Style” for the xcdatamodelId, I generated the class files by going to Editor -> Create NSManagedObject Subclass. I did this twice to establish all classes so there were no properties of type “NSManagedObject”.
However without touching any of the generated files, I am getting 4 errors for one of my class entities (Style), all of which are:
Semantic Issue – Redefinition of ‘Style’ as a different kind of symbol.
Considering these files are generated, I’m more than confused as to what I need to do to fix these. The relationships between entities are straightforward, and there is nothing special about the ‘Style’ entity which differentiates it from the rest.
Is this possible due to the forward declarations in the various files? I’m stumped as how to rectify this – and I’m a beginner with iPhone development so I’m not quite sure how to approach this. Help is greatly appreciated!
You cannot create a class named Style
it is already defined on MacTypes.h
You should always prefix your classes with your own namespace i.e.
Styleshould beDWStyle