Using Version 8.1 of Xcode.
Create an entity named "MapRegionObject" in .xcdatamodeld file.
Using auto code generator, click Editor on the navigation bar -> create NSManagedOject Subclass...
Got two files : MapRegionObject+CoreDataClass.swift and MapRegionObject+CoreDataProperties
Errors in two files showing in the screenshot: MapRegionObject+CoreDataClass.swift
MapRegionObject+CoreDataProperties
Please help me fix this bugs, thank you so much!
In Xcode 8.1, before using the auto code generator, you must select the entity in your data model:
Then go to the Data Model Inspector tab:
Under "Codegen" select "Manual/Node"
After that you could create a NSManagedObject
subclass without errors.
Alternatively, if you have already used 'Class Definition', you can go into your existing .xcdatamodeld file and set all current entities to 'Manual/None' under Codegen. Make sure to save your project (File -> Save), delete your existing Derived Data, clean the project, and then build. Resolved it for me without having to re-make my whole model.