"Compile error for data model in path" when compiling Core Data model after upgrading to lion

After upgrading to lion, the following error prevents the underlying data model from compiling successfully:

core-data-model / MyModel.xcdatamodeld: 0: error: compilation failed to create data model in the path "Resources / MyModel.momd / MyModel.mom

This is the output from the following command:

/ Developer / usr / bin / momc core-data-model / MyModel.xcdatamodeld Resources / MyModel.momd

Note that this command runs in a custom build script independent of xcode and that it runs without issue before upgrading to Lion.

I've read model compilation errors after upgrading to Lion (see this question for example ) but the solutions suggested there don't seem to apply.

Anyone else running into issues manually referring to compiling the model after upgrading to Lion? Any ideas? Thank.

+8


source to share


2 answers


Figured it out - it looks like the object model compiler now expects the destination path to be absolute. It works:



/ Developer / usr / bin / momc core-data-model / MyModel.xcdatamodeld / Users / amos / projects / my -project / resources / MyModel.momd

+10


source


I was getting this error too because I had bad feedback in my model: enter image description here



I fixed it by dividing it into two inverse ratios: enter image description here

+4


source







All Articles