SuperID SDK in ReactNative
npm i --save superid-react-native
react-native link superid-react-native
Cocapods:
pod 'SuperIDRN', :path => './node_modules/superid-react-native/iOS'
Run pod install
android/settings.gradle
:: Add the following snippet
include ':SuperIDRN'
project(':SuperIDRN').projectDir = file('../node_modules/superid-react-native/Android')
android/app/build.gradle
: Add in dependencies block.
compile project(':SuperIDRN')
- in your
MainActivity
(or equivalent) the SIDRNPackage needs to be added. Add the import at the top:
import com.yourtion.SuperIDRN.SIDRNPackage;;
- In order for React Native to use the package, add it the packages inside of the class extending ReactActivity.
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
...
new SIDRNPackage()
);
}