简体   繁体   中英

Adding NSManagedObject INTO XCDataModelD Core Data Bundle in XCode 4

There is already an existing "*.xcdatamodeld" core data bundle/package as part of my project which contains a single "*.xcdatamodel" (with a green tick because its the current version) and numerous .h and .m NSManagedObject files.

I would like to have XCode generate a new NSManagedObject (.h and .m files) and have it added with-in the "*.xcdatamodeld" bundle however whatever way I try the files get added into the same group as the bundle and not with-in the bundle itself.

The ways I've tried are:

1) Highlighting "*.xcdatamodeld" and selecting "Editor > Create NSManagedObject Subclass...", etc.

2) Right clicking the "*.xcdatamodeld" and selecting "Add Files to *" and choosing an NSManagedObject, etc.

I have considered whether I should be moving the files into the bundle afterwards but I can't seem to find any way of doing this either.

Please help?

as you suggested, my comment as an answer:

I don't think that it's possible with XCode4 to achieve this. In XCode3 this was no problem. You could still copy the files manually to the package but there's no way to get those files within the model. I don't think that this was the intended way in XCode3 and Apple corrected that now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM