简体   繁体   English

Xcode生成NSManagedObject子类问题

[英]Xcode generate NSManagedObject Subclass issue

After I set up Core Data Stack, I generated the NSManagedObject Subclass automatically. 设置核心数据栈后,我自动生成了NSManagedObject子类。

However, I received the error in xcode 8, which is very annoying. 但是,我在xcode 8中收到错误,这很烦人。 在此处输入图片说明

在此处输入图片说明

So I also ran in this issue. 所以我也遇到了这个问题。 You have to disable automatical code generation if you want to create the NSManagedObjects by yourself. 如果要自己创建NSManagedObjects,则必须禁用自动代码生成。 So there are different ways. 因此,有不同的方法。 First way is go to your model and changed the Toolversion to xCode 7.3. 第一种方法是转到模型,然后将Toolversion更改为xCode 7.3。 In every entity you can set the Codegen to Manual/None like in the Screenshot. 在每个实体中,都可以像在屏幕截图中那样将Codegen设置为Manual / None。 Clean your project, and try again! 清理您的项目,然后重试! I hope this was helpful. 我希望这可以帮到你。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM