Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid redeclaration on CoreData classes

I am working with CoreData, on an entity called "RoleName".

The problem is: I click on "Create NSManagedObject subclass" from within my model, and so it automatically creates the classes for my entity.

However, on the declaration of the class, I get this error:

Invalid redeclaration of "RoleName"

even though I don't have any other class with the same name.

like image 478
dpstart Avatar asked Nov 03 '16 19:11

dpstart


1 Answers

This is because Xcode handles all that by itself. I felt it like a bit of trouble as the auto generated classes don't have all my properties.

So follow these steps to get this as it used to be:

  • Delete what ever classes you already made for core data.
  • Set class.Module as Current Product module enter image description here

  • Set Class.codegen as Manual/None

enter image description here

  • Now select your entity and create NSmanagedobject subclass enter image description here

  • You are all set

like image 178
Deepukjayan Avatar answered Sep 24 '22 02:09

Deepukjayan