We are currently working on adding a 3rd party SDK into our React Native app.
Here is the SDK https://gitlab.com/claysolutions/public/clay-sdk
We added the ClaySDK Pod, set up everything, the build goes well, but when the app loads we are getting the following error:
dyld[49561]: Library not loaded: @rpath/VirgilCrypto.framework/VirgilCrypto
This library is required by the Clay SDK. We tried a lot of things in order to get it working:
- Manually adding the VirgilCrypto Pod,
- Building without any excluded archs
- Obviously, deleting Derived Data, reintegrating the pods, cleaning the build folder, build again, etc., nothing worked.
A few people already experienced this issue on the SDK, but no viable solution found yet, as mentioned in this issue: https://gitlab.com/claysolutions/public/clay-sdk/-/issues/14
Here are our versions of react and react-native
“react-native”: “0.71.6",
“react”: “18.2.0"
If anyone has a clue about what the issue might be or has ever encountered this kind of issue, we’d love to hear about a solution.
2
Answers
We fixed the issue by creating a new target for this specific pod.
This could occur due to many reasons. We could try solving them one by one. Any one of them or combination of 2 or more could solve the issue –
First solution –
a. Go to
General > Frameworks, Libraries, and Embedded Content
b. Select
Embed & Sign
against your frameworkTry setting
"Always Embed Swift Standard Libraries" to Yes
in your target’s build settingsTry changing Required to Optional in Linked Frameworks and Libraries for your Clay framework.
Try adding the following line to Runpath Search Paths under Build Settings tab:
@executable_path/Frameworks
Add
@executable_path/Frameworks
to the project Runpath Search Paths, not target.Let me know if any of it works, meanwhile I am still working on more possible solutions.