TL; DR
Linking the built-in framework with other frameworks and not linking another structure to your application application required code signature missing when building and running on the device.
Description:
Setup:
My setup is pretty simple (Swift 2.3 and Xcode Xcode 8.0; Build version 8S162m):
- Using Carthage (0.17.2) I have Other.framework with
xcodebuild 8.0 and TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3 carthage build --platform iOS - MyApp has built in My.framework .
- Application and framework projects are in the same Xcode workspace.
- I linked Other.framework to My.framework ONLY (this means that MyApp is not related to Other.framework at all). The fact is that MyApp does not need to use the Other.framework API.
Problem:
Everything seems to be working fine while I'm building and running the application on the device . The running application and process is interrupted by 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 checked the signature of Other.framework and I was fine. Besides,
Solution (workaround)
MyApp link with Other.framework . Awful ... It seems broken.
By linking the same binary Other.framework to MyApp and solving the problem this way, indicates Other.framework is OK and the ability to correctly re-subscribe. Perhaps it has nothing to do with Carthage.
Note: There is a similar issue with the iOS 8+ framework with embedded infrastructure , however, I have a slightly different reason.
ios xcode swift2 xcodebuild ios-frameworks
Yevhen dubinin
source share