2

my team and I are having problems for compile a Objective C project in Xcode 9.4. Anyone have an idea of what's happening??

<unknown>:0: error: filename "Message+CoreDataClass.swift" used twice: '/Users/josepmmirabent/houtel-ios-2016/Houtel2/DerivedData/Jumbotours/Build/Intermediates.noindex/Jumbotours.build/Debug-iphonesimulator/Jumbotours.build/DerivedSources/CoreDataGenerated/Model/Message+CoreDataClass.swift' and '/Users/josepmmirabent/houtel-ios-2016/Houtel2/DerivedData/Jumbotours/Build/Intermediates.noindex/Jumbotours.build/Debug-iphonesimulator/Jumbotours.build/DerivedSources/CoreDataGenerated/Model/Message+CoreDataClass.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name
<unknown>:0: error: filename "Message+CoreDataProperties.swift" used twice: '/Users/josepmmirabent/houtel-ios-2016/Houtel2/DerivedData/Jumbotours/Build/Intermediates.noindex/Jumbotours.build/Debug-iphonesimulator/Jumbotours.build/DerivedSources/CoreDataGenerated/Model/Message+CoreDataProperties.swift' and '/Users/josepmmirabent/houtel-ios-2016/Houtel2/DerivedData/Jumbotours/Build/Intermediates.noindex/Jumbotours.build/Debug-iphonesimulator/Jumbotours.build/DerivedSources/CoreDataGenerated/Model/Message+CoreDataProperties.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name
<unknown>:0: error: filename "Model+CoreDataModel.swift" used twice: '/Users/josepmmirabent/houtel-ios-2016/Houtel2/DerivedData/Jumbotours/Build/Intermediates.noindex/Jumbotours.build/Debug-iphonesimulator/Jumbotours.build/DerivedSources/CoreDataGenerated/Model/Model+CoreDataModel.swift' and '/Users/josepmmirabent/houtel-ios-2016/Houtel2/DerivedData/Jumbotours/Build/Intermediates.noindex/Jumbotours.build/Debug-iphonesimulator/Jumbotours.build/DerivedSources/CoreDataGenerated/Model/Model+CoreDataModel.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

Thanks!

Pol Valls Ortiz
  • 282
  • 2
  • 14

1 Answers1

4

Go into your project settings > select your main app target > Build phases > Compile Sources and remove the duplicate entries in that list referring to the files listed in your compile errors. It looks like some files are listed for compilation twice which would cause this issue.

This is usually an issue in the xcode project file, I have had this issue occur due to manually resolving git conflicts in the project file.

If that does not solve your issue make sure you do not have files with the same name in the project.

Scriptable
  • 19,402
  • 5
  • 56
  • 72