Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Carthage: Multiple build commands for output file framework

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!

like image 876
SRMR Avatar asked Oct 18 '17 00:10

SRMR


1 Answers

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.

like image 85
Marc Avatar answered Oct 21 '22 13:10

Marc