Carthage: When AlamofireImage is added to a watchOS extension target Xcode complains that the watchOS framework was built for iOS when installed through Carthage

Created on 8 Jan 2016  路  5Comments  路  Source: Carthage/Carthage

I get this error when I try to add the 2 frameworks(Alamofire & AlamofireImage) to my WatchKit Extension target. It actually does not matter from which platform Build folder I will add the frameworks. It always shows the same error.
ld: building for watchOS simulator, but linking against dylib built for iOS, file '/Some-Project-Filder/Carthage/Build/iOS/AlamofireImage.framework/AlamofireImage' for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

question

Most helpful comment

That's probably because you have Carthage/iOS in the FRAMEWORK_SEARCH_PATHS setting of your watchOS target.

All 5 comments

That's probably because you have Carthage/iOS in the FRAMEWORK_SEARCH_PATHS setting of your watchOS target.

That was the problem. Sorry for the noob question!

@ivan-konov no need to apologize! Xcode should not require us to configure all this stuff manually.

it just works

The "paths" build settings are always a tricky matter I just forgot to check it. Every time I have such a problem I think I should file a radar to Apple so they create separate UI for that! :D
Thanks again!

Spent 1h looking for the cause of this error and kept going in circles with carthage's copy-frameworks step... Thanks @NachoSoto!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akaffenberger picture akaffenberger  路  3Comments

jdecarlo picture jdecarlo  路  3Comments

rogernolan picture rogernolan  路  3Comments

mdiep picture mdiep  路  3Comments

justinmakaila picture justinmakaila  路  4Comments