iPeter iPeter - 10 days ago 7
iOS Question

Duplicate Symbol Error in NSManagedObject Subclass in Xcode 8

I just simply created a demo project with Core Data.

I created an entity

Userinfo
in my data model. Now I created a
NSManagedObject
subclass of this entity.

Xcode autogenerated this 4 classes.

enter image description here

Now when I build the project it throws this error:

enter image description here

I have done everything I know to remove the error of duplicacy but nothing helped.

I think its a Xcode bug. Please help.

Answer

You are generating files which have already been generated for you by Xcode and thus get duplicate declarations.

Find detailes in this answer.