Mogenerator - 在生成时不生成文件 [英] Mogenerator - No files are generated on build
问题描述
我正试图将Mogenerator集成到我的Xcode 5项目中。我使用RestKit和Core Data,但我的数据库的结构有一个相对频繁的变化的趋势,我发现很难跟上这些变化,没有像Mogenerator。
我已经按照 this 教程,但是当我构建Mogenerator目标时,没有任何反应。我有两个实体在我的Core Data模型中创建, Organization
和运动
,其中组织
与 Sport
p>
在我的Mogenerator目标的运行脚本部分,我在Shell中有 / usr / local / bin
'文本框,因为当在Shell文本框中有 / bin / sh
时,我无法获取Build成功。我运行这个脚本:
mogenerator -m Recreation2 / Recreation2.xcdatamodeld -O Recreation2 / Model --template-var arc = true
其中 Recreation2
我的项目和我的核心数据模型的名称。
为什么没有创建?
确保您设置了每个实体的自定义类名称,如此在您的模型中。您需要确保您从默认的NSManagedObject更改它,否则Mogen会忽略它。
I am trying to integrate Mogenerator into my Xcode 5 project. I am using RestKit along with Core Data, but the structure of my database has a tendency to change relatively frequently and I've found it difficult to keep up with these changes without something like Mogenerator.
I have followed the steps laid out in this tutorial, but when I build the Mogenerator target, nothing happens. The Log Navigator tells me that '0 machine files and 0 human files were generated.' I have two entities created in my Core Data model, Organization
and Sport
, where Organization
has a 'to-many' relationship to Sport
.
In the 'Run Script' section of my Mogenerator Target, I have /usr/local/bin
in the 'Shell' text box because I cannot get the Build to succeed when I have /bin/sh
in the 'Shell' text box. I am running this script:
mogenerator -m Recreation2/Recreation2.xcdatamodeld -O Recreation2/Model --template-var arc=true
where Recreation2
represents both the name of my project and the name of my core data model.
Why is nothing being created? And if I get to the point where something IS being created, where will it be created at?
Make sure you set the custom class name for each Entity like so in your model. You need to make sure you change it from the default NSManagedObject or Mogen will ignore it.
这篇关于Mogenerator - 在生成时不生成文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!