Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to ignore missing inverse warnings when compiling a managed object model?

The title pretty much contains the question. We released an app with a data model that had their inverses improperly configured. We fixed these in the next release with a new version of the data model, but Xcode still displays the warnings when compiling the previous data model version.

I don't want want to break the ability to migrate documents from the old data model to the new data model and I'm pretty sure that changing the inverses in the old data model will do just that. So, I'm wondering if there's a way to suppress that warning for just that file - I'm concerned somebody else might come along, see the warning, and decide to "fix" it.

Edit: Based on pe8ter's comments, it looks like I want to specify the MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS option for a single revision of the data model. I don't want to turn it off project-wide or even model bundle-wide because I want the warnings to appear if people make this same mistake in the future.

like image 963
Jablair Avatar asked Jan 04 '12 17:01

Jablair


1 Answers

Since you're only including the file for backwards compatibility, and therefore you don't want it to ever change, I would recommend checking the already compiled file into source control and using a Copy Files build phase to put it in the correct place.

Since we're just talking about a single revision in a bundle, you might need to keep an empty, dummy version in the model source (so it gets the numbering right). Then your Copy Files phase would just overwrite it.

like image 132
benzado Avatar answered Oct 21 '22 13:10

benzado