mohsen
mohsen

Reputation: 5088

Create NSManagedObject Subclass... make a new Error in my project

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

Upvotes: 15

Views: 3630

Answers (2)

vadian
vadian

Reputation: 285290

Select the xcdatamodeld file in the project navigator, select the entity and press ⌥⌘3 – in Xcode 13 ⌥⌘4 – to show the 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.

Upvotes: 51

Ekramul Hoque
Ekramul Hoque

Reputation: 692

In Xcode 11

1.Remove info list from Build Phases > Copy Bundle Resources

2.Remove Created Subclass from Build Phases > Compile Sources

Than Run if its not working use legacy build settings

From: File > Project Settings > build settings > legacy build settings

enter image description here

Upvotes: 0

Related Questions