Mogenerator not found by Xcode

怎甘沉沦 提交于 2019-12-05 14:58:41

问题


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?


回答1:


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 ...


来源:https://stackoverflow.com/questions/19248302/mogenerator-not-found-by-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!