问题
I can't get Mogenerator 1.27 to generate the NSManagedObject classes as I'm getting this error:
Assertion failed: (momcTool && "momc not found"), function -[MOGeneratorApp setModel:], file /tmp/mogenerator-LDeD/mogenerator-1.27/mogenerator.m, line 643. Abort trap: 6
I'm using this command:
mogenerator -m myApp/myModel.xcdatamodeld/myModel.xcdatamodel -O myApp/Model --template-var arc=true
The exact same command works on my old computer, but not on my new one with the same version of Mogenerator. Why would it not work on my new computer?
回答1:
You may need to tell Xcode which command line tools to use, in Preferences/Locations. I had accumulated several from Xcode 4, 5 and 6 and this selection had become blank somehow.
来源:https://stackoverflow.com/questions/24816463/mogenerator-assertion-failed-momctool-momc-not-found-function-mogener