small medium large xlarge

Back to: All Forums  Core Data
Generic-user-small
18 Nov 2010, 20:06
Greg Robertson (21 posts)

I posted this question here: https://devforums.apple.com/thread/77102

But maybe this is a better place.

I have a Core data model with numerous versions (xcdatamodel files) all of which are contained in the xcdatamodeld file as well as the migration schemes (xcmappingmodel files) and the header an implementation files for each entity class.

I really like how the xcdatamodeld holds all of this neatly in one file but ….

When I add the xcdatamodeld file to my Mac app only the xcdatamodeld and xcdatamodel files appear, I cannot see any of the xcmappingmodel files or header or implementation files. To make matters worse if I create new header and implementation files based on my model and try and save them to the xcdatamodeld XCode crashes.

I guess maybe the xcmappingmodel, header and implementation files should not be in the xcdatamodeld but now that they are in there how do I get them out?

Is there an app like RsrcEdit that can extract the xcmappingmodel, header and implementation files from the xcdatamodeld file?

Anyone?

Thanks

Greg

Avatarsmall_pragsmall
18 Nov 2010, 21:28
Marcus S. Zarra (284 posts)

Mapping models do not belong inside of the xcdatamodeld bundle. They should be outside of it.

In addition, make sure they are included in your target and once you have built the app open the bundle and look for them. They should be pretty easy to find if they have been compiled.

Generic-user-small
18 Nov 2010, 22:06
Greg Robertson (21 posts)

Any idea how to get the migration model out of the xcdatamodeld other than re-creating it?

Avatarsmall_pragsmall
18 Nov 2010, 22:40
Marcus S. Zarra (284 posts)

the xcdatamodeld is just a folder. Go into it and move the files.

Generic-user-small
19 Nov 2010, 21:36
Greg Robertson (21 posts)

I can’t go into it in the Finder, is there another app that will open it as a folder?

Thanks

Greg

Avatarsmall_pragsmall
19 Nov 2010, 23:45
Marcus S. Zarra (284 posts)

Right click on it in finder and select “show contents”.

You can also use Terminal.

You must be logged in to comment