Issue:
When running on macOS or iOS, the error "no suitable image" or "code signature invalid" can 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:
These issues can be fixed by removing the invalid signature from the Vivox library files. This can be achieved by performing the following steps:
- Close any open editors, such as the Unity or Unreal Engine Editor, which can cache older library files.
- Locate the Vivox library files with the invalid signature. The file locations are specified in the error messages.
- Navigate to the specified directory using Terminal.
- Run the following commands on each of the Vivox library 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 library files, use the following command:
codesign --remove-signature *.dylib
codesign --remove-signature *.bundle
After you run the commands, you can use Vivox on macOS and iOS without the invalid signature errors.