I have an iOS app (not made with xcode) and I need to include in it a dynamic library. I have this library on my computer:
\webrtc
\WebRTC.framework
\Headers
\*.h
\Modules
\module.modulemap
\WebRTC
\Info.plist
and I deploy those files inside my app like this :
ALLiveVideoChatClient.app
\Frameworks
\WebRTC.framework
\Headers
\*.h
\Modules
\module.modulemap
\WebRTC
\Info.plist
when I do
otool -L ALLiveVideoChatClient.app/ALLiveVideoChatClient
it's return me:
@rpath/WebRTC.framework/WebRTC (compatibility version 0.0.0, current version 0.0.0)
and when I try to run my app I receive the error:
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Library not loaded: @rpath/WebRTC.framework/WebRTC | Referenced from: /var/containers/Bundle/Application/A2C3A7DA-D35E-4649-AEA0-9AB518E48971/ALLiveVideoChatClient.app/ALLiveVideoChatClient | Reason: image not found Triggered by Thread: 0
so I check the value of @rpath doing
otool -l ALLiveVideoChatClient.app/ALLiveVideoChatClient
it returns me
cmd LC_RPATH
cmdsize 32
path $ORIGIN (offset 12)
I m not sure what mean $ORIGIN
but seam it's point to ALLiveVideoChatClient.app
so i update the @rpath to point to $ORIGIN/Frameworks
adding -rpath $ORIGIN/Frameworks
to the linker (http://www.manpagez.com/man/1/ld/) but i still receive the error image not found
What I did wrong? What are the steps to manually add (so without xcode) a dynamic library to an iOS app?