11

I am migrating an old app from swift 3 to swift 4 and got stuck this error:

error: Multiple commands produce '/Users/.../Library/Developer/Xcode/DerivedData/ ... /Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule':
1) Target 'CompassV3' (project 'Void Navigator'): Ditto /Users/.../Library/Developer/Xcode/DerivedData/.../Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule /Users/.../Library/Developer/Xcode/DerivedData/Void_Navigator-bogrvoiumgmhfwcpvocwtssiwgpm/Build/Intermediates.noindex/Void Navigator.build/Debug-iphonesimulator/CompassV3.build/Objects-normal/x86_64/CompassV3.swiftmodule
2) Target 'Outdoor Navigator' (project 'Void Navigator'): Ditto /Users/.../Library/Developer/Xcode/DerivedData/.../Debug-iphonesimulator/CompassV3.swiftmodule/x86_64.swiftmodule /Users/.../Library/Developer/Xcode/DerivedData/Void_Navigator-bogrvoiumgmhfwcpvocwtssiwgpm/Build/Intermediates.noindex/Void Navigator.build/Debug-iphonesimulator/Outdoor Navigator.build/Objects-normal/x86_64/CompassV3.swiftmodule

CompassV3 builds the App

Outdoor navigator is an extension.

Looks like a conflict, but i don't have a clue how to solve it.

The projects are still on swift version 3.

Chris Hanson
  • 54,380
  • 8
  • 73
  • 102
MiguelSlv
  • 14,067
  • 15
  • 102
  • 169
  • 1
    Can you go to both targets in the project, go to Build Settings and check the values for "Product Module Name" in the Packaging section? – Thomas Bartelmess May 07 '19 at 13:02
  • Both had the same name. I added a suffix to the extension target and it solved, i can now build using the new Build System. Respond if you want, i will accept it. – MiguelSlv May 07 '19 at 22:41

1 Answers1

27

You most likely have two targets with the same product name.

Can you both targets in the project, go to Build Settings and check the values for "Product Module Name" in the Packaging section?

Thomas Bartelmess
  • 1,111
  • 8
  • 17
  • 1
    If I change product module name, I need to change all the import statements. Is there any other way to solve this problem? – Emre Önder Feb 24 '20 at 06:58