Xcode 8 generates broken NSManagedObject subclasses for iOS 10

后端 未结 22 894
栀梦
栀梦 2020-11-27 11:13

I updated my iOS app project recently to iOS 10. Now I\'m trying to change the Core Data Model of my app but the new NSManagedObject subclasses which Xcode generates are bro

22条回答
  •  攒了一身酷
    2020-11-27 12:06

    I think it is a xcode issue, where xcode generates wrong syntax for core data category class. I am creating a nsmanageobjectsubclass for one entity AgentDetails

    Here xcode create wrong code structure in AgentDetails+CoreDataClass.h and AgentDetails+CoreDataClass.m. Those have a code structure like:

    And

    So it is having duplicate interface issue as AgentDetails.h have same interface.

    Now to fix this you have to change the code in AgentDetails+CoreDataClass.h

    and AgentDetails+CoreDataClass.m like this:

提交回复
热议问题