我试图让mogenerator(1.26最新)从核心数据模型(xcdatamodel)生成一些锅炉板类,并报告:
No entities found in model. No files will be generated. (model description: (<NSManagedObjectModel: 0x10012e410>) isEditable 1,entities { },fetch request templates { })
即使xcdatamodel的内容显然存在
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <model name="" userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1487" systemVersion="11E53" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic"> <entity name="Chair" representedClassName="Chair" syncable="YES"> <attribute name="name" attributeType="String" maxValueString="50" syncable="YES"/> </entity> ...
我究竟做错了什么?
我正在使用Xcode 4.4.1和mogenerator 1.26
解决方法
这是
http://raptureinvenice.com/getting-started-with-mogenerator/的报价
When you create entities in your data model,be sure to populate the
“Class” field with the same name as the entity.
所以你要做的是:
>打开您的数据模型>选择您的实体>在右侧面板中,选择数据模型检查器(第3个)>编辑与“名称”字段同名的“类”字段