required code signature missing
TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3 carthage build --platform iOS
dyld: Library not loaded: @rpath/Other.framework/Other
Referenced from: /private/var/containers/Bundle/Application/DCF0331F-FF23-43CF-AE79-B3857D5A6EE3/MyApp.app/Frameworks/My.framework/My
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/DCF0331F-FF23-43CF-AE79-B3857D5A6EE3/MyApp.app/Frameworks/My.framework/Frameworks/Other.framework/Other: required code signature missing for '/private/var/containers/Bundle/Application/DCF0331F-FF23-43CF-AE79-B3857D5A6EE3/MyApp.app/Frameworks/My.framework/Frameworks/Other.framework/Other'
Discussing this issue on the Carthage github page, it's become clear that the workaround mentioned in the question, is actually an expected behaviour:
Carthage doesn't support nested frameworks.
Nesting frameworks doesn't let you reuse those frameworks. For instance, if
B.frameworkboth depend on
Other.framework, then neither of them can nest
Other.framework—otherwise you might end up with 2 different versions, and the correct one might not be chosen at runtime.
The correct way to do this is to list it as a dependency, but link it into the app target.
This was unclear from the README, so I raised another issue, requesting to update the documentation:
This is resolved and closed in the scope of the PR: