Question

Using Xcode 6 beta 4 Core Data, how do you regenerate the subclasses if you want to add/remove an Attribute?

For example, I create a new entity and add a few attributes then go to Editor > CreateNSManagedObjectSubclass.., it works the first time and creates the entity as a .swift file, but then if I go and add a new entity and try to regenerate the subclasses by choosing the same option in the editor menu it doesn't overwrite the .swift file with the new entity. This used to work for me in Xcode 5.

Does anyone know what I'm doing wrong or what is the correct way to do this?

Thanks!

Was it helpful?

Solution

Xcode won't silently overwrite your file. This is a feature, not a bug, because you will not inadvertently lose custom code in those classes.

If you want to replace the file, delete it first. The class generation will then work as expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top