07-20-2023, 06:34 AM
I have a project containing another target(framework) which is a dependency of the main project. That framework requires it's own frameworks, so I've added them using carthage. The project compiles and runs fine on simulator, however I'm getting the following error when running it on a physical device:
dyld: Library not loaded: @rpath/Subframework.framework/Subframework
Referenced from: /private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/MyAppSDK
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/Frameworks/Subframework.framework/Subframework: mmap() error 1 at address=0x00798000, size=0x00060000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/Frameworks/Subframework.framework/Subframework
I have tried [this][1], however the only solution is to add the Subframework to "Embed frameworks" to top level project, which is not viable. I've tried modifying Build Settings -> Linking -> Dynamic Library Install name, however it didn't help.
How can achieve make it work on the iphone?
[1]:
dyld: Library not loaded: @rpath/Subframework.framework/Subframework
Referenced from: /private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/MyAppSDK
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/Frameworks/Subframework.framework/Subframework: mmap() error 1 at address=0x00798000, size=0x00060000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/LONG-ID/MyApp.app/Frameworks/MyAppSDK.framework/Frameworks/Subframework.framework/Subframework
I have tried [this][1], however the only solution is to add the Subframework to "Embed frameworks" to top level project, which is not viable. I've tried modifying Build Settings -> Linking -> Dynamic Library Install name, however it didn't help.
How can achieve make it work on the iphone?
[1]:
[To see links please register here]