Xcode 数据模型编译器 - MOMC 错误:命令 momc 失败,退出代码为 1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12102504/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Data Model Compiler - MOMC Error: Command momc failed with exit code 1
提问by emmandroid
I am having troubles integrating XMPP on my iOS Project using Xcode 4.4 under Mac Mountain Lion OS X. I followed every step but I got stuck with this problem:
我在 Mac Mountain Lion OS X 下使用 Xcode 4.4 在我的 iOS 项目上集成 XMPP 时遇到了麻烦。我遵循了每一步,但我遇到了这个问题:
Command momc failed with exit code 1
命令 momc 失败,退出代码为 1
I have deleted all the .xcdatamodel files, clean and re-build the project, but the error is still there.
我已经删除了所有 .xcdatamodel 文件,清理并重新构建项目,但错误仍然存在。
回答by emmandroid
Ok. Solved it. You have to delete the *.xcdatamodel files on the Xcode project. (Right click > Delete).
好的。解决了。您必须删除 Xcode 项目中的 *.xcdatamodel 文件。(右键单击 > 删除)。
回答by szotp
Check if you have empty .xcdatamodel folders inside .xcdatamodeld. This may happen due to git behaviour for example.
检查 .xcdatamodeld 中是否有空的 .xcdatamodel 文件夹。例如,这可能由于 git 行为而发生。
回答by shuiyouren
回答by Mohammad Parvez
Face the same problem
面临同样的问题
I just created new model with new name and copy all the entity from old model and paste in new model and deleted old model, it worked
我刚刚用新名称创建了新模型,并从旧模型中复制了所有实体并粘贴到新模型中并删除了旧模型,它起作用了
回答by Jeremie D
This also can happen when the project is first compiled on a newer version of xCode (beta versions for example) and then trying to recompile with the original version.
当项目首先在较新版本的 xCode(例如 beta 版本)上编译,然后尝试使用原始版本重新编译时,也会发生这种情况。