创建NSManagedObject子类...在我的项目中犯一个新错误 [英] Create NSManagedObject Subclass... make a new Error in my project
问题描述
我想通过Editor\Create NSManagedObject Subclass ...菜单为我的实体添加一个类。但是当我添加它时,项目出错了,这是消息:
i want to add a class for my entity by Editor\Create NSManagedObject Subclass... menu . but when i added it , the project made an error , this is the message:
Multiple commands produce '/Users/mohsenkhodadadzadeh/Library/Developer/Xcode/DerivedData/walk-fcnteanemrfigmfaalqkvwigvwqc/Build/Intermediates.noindex/walk.build/Debug-iphonesimulator/walk.build/Objects-normal/x86_64/WalkEntity+CoreDataProperties.o':
1) Target 'walk' (project 'walk') has compile command for Swift source files
2) Target 'walk' (project 'walk') has compile command for Swift source files
Multiple commands produce '/Users/mohsenkhodadadzadeh/Library/Developer/Xcode/DerivedData/walk-fcnteanemrfigmfaalqkvwigvwqc/Build/Intermediates.noindex/walk.build/Debug-iphonesimulator/walk.build/Objects-normal/x86_64/WalkEntity+CoreDataClass.o':
1) Target 'walk' (project 'walk') has compile command for Swift source files
2) Target 'walk' (project 'walk') has compile command for Swift source files
我更改了构建系统文件->项目设置中的旧版构建系统。但这还行不通
i changed that build system to Legacy Build system in File->Project settings . but it diden't work yet
该项目是用xcode9制作的,我现在用xcode 10进行了开发
this project made with xcode9 and i develope it with xcode 10 now
推荐答案
在项目导航器中选择 xcdatamodeld
文件,选择实体并按⌥⌘3(数据模型检查器)。
Select the xcdatamodeld
file in the project navigator, select the entity and press ⌥⌘3 (Data Model Inspector).
如果您手动创建了该类,则必须将 Codegen
弹出窗口设置为手动/无
,否则将隐式创建类文件。
If you created the class manually the Codegen
popup must be set to Manual/None
otherwise the class file is created implicitly.
这篇关于创建NSManagedObject子类...在我的项目中犯一个新错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!