8

I'm using Carthage for dependency management and have a bunch of warnings in my project:

"Multiple build commands for output file /Users/me/Library/Developer/Xcode/DerivedData/project-ymeymeyme/Build/Products/Debug-iphonesimulator/project.app/Frameworks/Alamofire.framework"

I'm not sure if the best way to take care of this is to just delete from derived data folder, or to remove in Build Phases from Link Binary With Libraries or Embed Frameworks or something?

Any idea? Thanks!

SRMR
  • 3,064
  • 6
  • 31
  • 59
  • What build settings regarding frameworks and scripts do you have for your target? Maybe there is a problem? – Adi Oct 20 '17 at 21:12
  • @Adi I think what you're referring to is this: In Run Script I have `/usr/local/bin/carthage copy-frameworks`. Is that overkill? – SRMR Oct 22 '17 at 19:47

2 Answers2

21

Seems to me that you are bundling the mentioned framework twice. (https://stackoverflow.com/a/5659415/1120481)

You mentioned that your target has a Run Script build phase with /usr/local/bin/carthage copy-frameworks what is recommended in the Carthage README file for iOS, tvOS and watchOS.

You're also asking whether you should remove the framework from Embedded Binaries. Did you add the framework to this list? If yes you may have mixed up the Carthage setup instructions for macOS and iOS, tvOS, watchOS.

If you're building for macOS, remove the script phase.

If you're building for iOS, tvOS or watchOS, remove the framework from Embedded Binaries.

Marc
  • 2,900
  • 3
  • 26
  • 40
4

I fixed the issue by changing the order of the Run Script phase that executes /usr/local/bin/carthage copy-frameworks below Embed Frameworks. This happens to be the last build phase for this target.

graemer957
  • 41
  • 4