Description
My implementation of the Zoom Video SDK resides in a plugin that is loaded by another app.
-
The plugin is linked against all 24 of the Zoom Video SDK libraries (asproxy.framework, cmmlib.framework, etc.) and copies all of these into the Frameworks folder of my plugin.
-
I have set the Runpath Search Paths (
@rpath
) in XCode build settings set to@loader_path/../Frameworks
Yet the call
[[ZMVideoSDK sharedVideoSDK] initialize:initParams]
fails with
ZMVideoSDKErrors_Load_Module_Error
However, if I move all 24 libraries into the Frameworks folder of the main application (i.e., the one that loads the plugin) then the call to [[ZMVideoSDK sharedVideoSDK] initialize:initParams]
succeeds and everything else works as expected.
It is important to note that calling
ZMVideoSDKInitParams *initParams = [[[ZMVideoSDKInitParams alloc] init] autorelease]
works, which actually proves that the Video SDK libraries are being loaded successfully.
Are you calling [NSBundle mainBundle] in your internal code?
I have a strong suspicion that you are calling [NSBundle mainBundle] to get a path to one of the Zoom Video SDK libraries in your internal code. Because this ignores the @rpath
, you end up looking in the Frameworks folder of the main application instead of the Frameworks folder of the plugin.
Which Desktop Video SDK version?
MacOS v1.1.0
To Reproduce(If applicable)
Steps to reproduce the behavior:
- Create a plugin that uses the Zoom Video SDK that will be loaded by some other app
- Link against that all 24 of the Zoom Video SDK and ensure they are copied to the Frameworks folder of the plugin (MyPlugin.bundle/Contents/Frameworks)
- When the plugin is loaded, attempt to init the Video SDK with [[ZMVideoSDK sharedVideoSDK] initialize:initParams]
- The call returns the error ZMVideoSDKErrors_Load_Module_Error
Device (please complete the following information):
- Device: Apple MacBook Pro 15"
- OS: macOS Mojave 10.13
Additional context
Thinking that you might be using the working directory, I tried changing the working directory to the plugin’s dylib, the plugin’s Frameworks folder and other paths related to the plugin. This did not prevent the error.
In addition, I have logging enabled for library loading this appears in the console output, showing that the libraries are actually being loaded upon calling [[ZMVideoSDKInitParams alloc] init]
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/Zoom Instant Receiver
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/viper.framework/Versions/A/viper
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/tp.framework/Versions/A/tp
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/asproxy.framework/Versions/A/asproxy
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/protobuf.framework/Versions/A/protobuf
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/libssl.dylib
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/libminizip.dylib
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/curl64.framework/Versions/A/curl64
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/nydus.framework/Versions/A/nydus
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/libcrypto.dylib
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/util.framework/Versions/A/util
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/xmpp_framework.framework/Versions/A/xmpp_framework
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/VideoSDK.dylib
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/cmmlib.framework/Versions/A/cmmlib
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/ZMVideoSDK.framework/Versions/A/ZMVideoSDK
dyld: loaded: /Library/Application Support/XXXXXXX/XXXXXXXPlugins_x64/Zoom Instant Receiver.izzyplug/Contents/MacOS/…/Frameworks/libjson.dylib