React Native Library for SimplSdk
This project serves as a SimplSdk wrapper to create custom React Native native SimplSDK modules that can later be installed through NPM and easily be used in production.
Installation
Using npm:
npm install --save react-native-simpl-sdk
or using yarn:
yarn add react-native-simpl-sdk
Linking
Run the following command to link the SDK to Android and iOS
react-native link react-native-simpl-sdk
Add native SDK
Android
Add the following to android/app/build.gradle
:
... repositories { maven { url "http://maven.getsimpl.com"}} dependencies { ... compile project(':react-native-android-library-simpl-sdk') compile "com.google.android.gms:play-services-auth-api-phone:16.0.0" //Used to support SMS autoread feature. Ignore if already present. compile "com.simpl.android:sdk:+"}
iOS
No additional steps required.
Usage
Simply import/require
it by the name defined in your library's package.json
:
//TO check either user is approved or notSimplSdk; //Authorise the transactionSimplSdk;