创建 NSManagedObject 子类...在我的项目中创建一个新的错误 [英] Create NSManagedObject Subclass... make a new Error in my project
问题描述
我想通过 EditorCreate NSManagedObject Subclass... menu 为我的实体添加一个类.但是当我添加它时,项目出错了,这是消息:
i want to add a class for my entity by EditorCreate 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
我在 File->Project settings 中将该构建系统更改为 Legacy Build 系统.但是还没用
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 – inXcode 13 ⌥⌘4 – 显示数据模型检查器.
Select the xcdatamodeld
file in the project navigator, select the entity and press ⌥⌘3 – in Xcode 13 ⌥⌘4 – to show the Data Model Inspector.
如果您手动创建了类,Codegen
弹出窗口必须设置为 Manual/None
,否则类文件将被隐式创建.
If you created the class manually the Codegen
popup must be set to Manual/None
otherwise the class file is created implicitly.
这篇关于创建 NSManagedObject 子类...在我的项目中创建一个新的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!