问题
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
this project made with xcode9 and i develope it with xcode 10 now
回答1:
Select the xcdatamodeld
file in the project navigator, select the entity and press ⌥⌘3 (Data Model Inspector).
If you created the class manually the Codegen
popup must be set to Manual/None
otherwise the class file is created implicitly.
来源:https://stackoverflow.com/questions/53104287/create-nsmanagedobject-subclass-make-a-new-error-in-my-project