Closed YMIUA closed 4 years ago
You have to manually register this package. Basically, go to android/*/MainApplication.java
to do this:
...
import org.libsodium.rn.RCTSodiumPackage;
...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
...,
new RCTSodiumPackage(),
...
For iOS you need to:
react-native link react-native-sodium
cd ios/
pod install
I'll close this one as there is no feedback from the reporter.
I try using Sodium in my project, but I have a problem with import Sodium. After import Sodium from 'react-native-sodium', object Sodium is null. I use your example to encrypt, but I have the same error. P.S before linking Sodium object has been undefined.