Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 Core Data Regenerating Subclasses

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!

like image 714
user3029430 Avatar asked Aug 02 '26 00:08

user3029430


1 Answers

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.

like image 137
Mundi Avatar answered Aug 07 '26 01:08

Mundi