Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mogenerator not found by Xcode

I'm trying to use Mogenerator in my iOS project developed in Xcode 5. I've installed Mogenerator with brew:

brew install mogenerator

then link:

brew link mogenerator

After that I have access to this tool from my command line.

Next I'm trying to add one more step (script executing) in build phases (shell /bin/sh):

mogenerator --model "${PROJECT_DIR}/MyProject/Model.xcdatamodeld/Model.xcdatamodel" --output-dir "${PROJECT_DIR}/MyProject" --template-var arc=true

In effect I get error:

line 2: mogenerator: command not found
Command /bin/sh failed with exit code 127

Do you have any advices how can resolve this issue?

like image 389
Grzegorz Avatar asked Oct 08 '13 12:10

Grzegorz


1 Answers

If /usr/local/bin is not in the search path used by Xcode, you can call mogenerator with an absolute (full) path:

/usr/local/bin/mogenerator --model ...
like image 151
Martin R Avatar answered Oct 19 '22 11:10

Martin R