Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MOMC error with XCode4 and Data Model Compile

Whenever I build my project, I'm getting the error:

Command /Developer/usr/bin/momc failed with exit code 1

I've read posts here about deleting extraneous Data Model versions as a fix, and nothing works. I'm stumped because nothing changes the behavior of my Build: It always fail with the above error code, regardless of whether I actually have CoreData model files or not.

What I did to cause this error: Switched to a versioning model

What I tried:

  • Removing new version of Data model
  • Removing any old versions of Data model
  • Removing entire versioning model and using previous version from Git
  • Completely deleting any files or references to .xcdatamodel files (no coredata at all)

I've built clean between each attempt, and restarted XCode multiple times. Always the "exit code 1" error with momc.

like image 761
beeudoublez Avatar asked Oct 09 '11 17:10

beeudoublez


1 Answers

Open up the .pbxproj file and manually remove all references to .xcdatamodel. Re-open XCode, Build Clean....and then drop in your older version of .xcdatamodel

like image 132
beeudoublez Avatar answered Sep 17 '22 18:09

beeudoublez