Create NSManagedObject subclass not generating property after updating to Xcode 6.0
After updating to Xcode Version 6.0 (6A313), when I add a new attribute to my xcdatamodeld entry, "Create NSManagedObject subclass" is not adding the new property to the generated header file. This works fine after closing Xcode 6, and then running Version 5.1.1 (5B1008). I repeated this process a couple of times with the same results. Do I need to do something to allow a new Xcode version to properly manage my data models, or recreate them, or is this possibly just a bug with the new Xcode? Here are the specific steps I took: 1. Open DataModel.xcdatamodeld in Xcode 6.0 (GM Seed). 2. Select correct entity 3. Click + to add new attribute 4. Enter name and selected Boolean type for new attribute 5. Editor->Create NSManagedObject subclass 6. Ensure proper data model is checked, click next 7. Ensure correct entity is checked, click next 8. Choose location to save (using root project folder), select Create 9. Choose "Replace" in dialogue box 10. Look for variable in generated header file. Variable not present. 11. Close Xcode6 12. Repeat steps 1-10 in Xcode 5.1.1, worked correctly 13. Repeated this process twice to verify same results Thanks for any help!
Ok, I figured out a workaround but it would appear this is a bug. For all the entities you want to regenerate, remove the existing files from disk try Editor->Create NSManagedObject subclass and select those classes that you have removed from disk. The files that don't currently exist are regenerated. This fixed the issue for me.
I had the same problem, Xcode didn't generate new properties after I choose "Replace" files. Just fix it doing next steps: after you change or add new entity in .xcdatamodel select changed entity Class files at "Groups & Files" list select "Delete" - "Move to Trash" (if need copy specific code from your class file) now back to .xcdatamodel and select entity you changed create new NSManagedObject subclass(use standard way)
This requires a workaround, but specifically the quickest way I found was: Setup your project such that the generated files from the model, are in a folder of their own. When you need to add/change attributes to your model, multi-select the set of auto-generated files, and hit backspace (and select move them to Trash) Re-generate your set of NSManagedObject files from the Model, back into the same folder
Before deleting your files and/or the data model itself as suggested, check whether you have added the module name in the Xcode's Data Model Inspector under Entity/Class. If you have, removing it will solve the problem of auto generating the entity classes. It will, however, reintroduce the problem you fixed by adding it in the first place (see Swift - CoreData: warning: Unable to load class named)... With this in mind, it appears a better solution to add the #objc(<ClassName>) above the generated class than to add the module name in the inspector.
Search for a particular string in a process memory using GDB in OSX
How to prevent Xcode 3.2.5 to not show those blue message bubbles when debugging?
How to Turn a View into Landscape Mode in Xcode 4
XCode- Need Help With Errors (Expected ; and Expected Statement)
How to set up SDL on XCODE 4?
xcode 4 add CoreData in a existing project
How can I find my application's resource group/map in XCode?
iOS Architecture and Xcode Organiser window
How to save the option selected in UIPickerView and Load it back up
SecTrustedApplicationCreateFromPath being too smart?
How to quickly remove all the unused variables with xCode?
Xcode keeps guessing and interpreting with wrong encoding
XCode - File not found but build successful
How do you manage the events in a UINavigationController view to switch views?
xcode crashes all the time !