(Offtop: Looking through other similar questions with zero to one answers, I don't believe in miraccle, that someone would answer me, but still think it worth trying)
My setup is pretty simple (Swift 2.3 & Xcode 8B2):
- Using Carthage I have build Other.framework
- MyApp has embeded My.framework framework.
- The app and framework projects are under one Xcode workspace.
- I hade linked Other.framework to My.framework ONLY (that means, MyApp is not linked to Other.framework at all). The point here is that, MyApp does not need to use Other.framework API.
Here is the problem:
Everything seems to work fine, until I Build & Run the app on the device. The app launched and than the process is aborted with the following Xcode error:
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'
I have checked the signature of Other.framework and it looked OK to me. Moreover,
The Workaround:
Link MyApp with Other.framework. Horrible. This feels broken.
Linking the very same binary Other.framework to MyApp and solving the issue this way, points out, the Other.framework is built OK and able to be re-signed correctly.