Scenario
When running on macOS/iOS, "no suitable image" or "code signature invalid" errors occur.
Example 1:
dyld: Library not loaded: @executable_path/libvivoxsdk.dylib
Reason: no suitable image found. Did find:
./libvivoxsdk.dylib: code signature invalid for './libvivoxsdk.dylib'
./libvivoxsdk.dylib: stat() failed with errno=1
libvivoxsdk.dylib: code signature invalid for 'libvivoxsdk.dylib'
Example 2:
Plugins: Couldn't open Assets/Plugins/x86_64/libVivoxNative.bundle, error:
dlopen(Assets/Plugins/x86_64/libVivoxNative.bundle, 2): no suitable image found, Did find:
Assets/Plugins/x86_64/libVivoxNative.bundle: code signature invalid for
'Assets/Plugins/x86_64/libVivoxNative.bundle'
Resolution
To fix this issue, remove the invalid signature from the Vivox LIB files by performing the following steps:
- Close any open editors, such as Unity Editor, which can cache older LIB files.
- Locate the Vivox LIB files with the invalid signature. These are specified in the error messages.
- Go to the specified directory by using Terminal.
- Run the following commands on each of the Vivox LIB files:
codesign --remove-signature <lib-name>
For example, for libvivoxsdk.dylib
, use the following command:
codesign --remove-signature libvivoxsdk.dylib
If the directory contains only Vivox LIB files, use the following command:
codesign --remove-signature *.dylib
codesign --remove-signature *.bundle
After you run the commands, you can run on macOS/iOS without the invalid signature error.