4

I run into a problem with Xcode8 and automatic CoreData NSMangedObject creation.

The toolversion is already downgraded to Xcode7.3 and the entities are in codegen mode manual/none. I added a new attribute to an entity and created the NSManagedObject subclass over the Editor->Create NSManagedObject Subclass.

XCode now generates the Entity+CoreDataClass.h/m and the Entity+CoreDataProperties.h/m Files.

Does this mean that I have to change any #import (no Problem by search and replace) or is there an other way to get the old Entity.h and Entity.m Files?

What about my existing code in the Entity.m files, do I have to copy & paste it to the new Entity+CoreDataClass.m file?

In my opinion the code generation is buggy. If there is a relation to other classes the import in the Entity+CoreDataClass.m file is wrong. The class imports the old Entity.h files...

Perhaps anyone has an idea. If there isn't any other possibility this could only be a joke by Apple....

Ketan P
  • 4,259
  • 3
  • 30
  • 36
Gulliva
  • 488
  • 2
  • 10
  • 4
    I'm experiencing the same issue just now also. Whats worse is if you have relationships. The category files refer to a Entity.h that isn't generated..... – Dan H Sep 22 '16 at 10:05
  • 1
    I think this is linked http://stackoverflow.com/questions/39657231/xcode-8-generates-broken-nsmanagedobject-subclasses-for-ios-10, you are not alone, but I haven't seen a fix or workaround yet – Longmang Sep 23 '16 at 13:56
  • Is there a bug/issue listed with Apple regarding the category files referencing the old Entity.h (opposed to the Entity+CoreDataClass.h) files when using relationships? having difficulty finding any info on this issue. – Paul Popiel Feb 22 '17 at 01:55

0 Answers0