Installation

React Native Wrapper

To get started, you can install the modules as such:

$ npm install react-native-validic-session --save --registry https://validic.jfrog.io/artifactory/api/npm/mobile-npm-release/

or use yarn

$ yarn add react-native-validic-session --registry https://validic.jfrog.io/artifactory/api/npm/mobile-npm-release/

These examples add the Session module to your project.

Linking

Automatic

react-native link react-native-validic-session

NOTE: For iOS users using Pods, you still need to run pod install after running the above link command inside your IOS folder.


Manual

iOS (via CocoaPods)

Add the following lines to your build targets in your Podfile

pod 'React', :path => '../node_modules/react-native'

pod 'RNValidicSession', :path= => '../node_modules/react-native-validic-session'

Then run pod install


Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  2. Append the following lines to android/settings.gradle:
    1. Add import com.validic.mobile.rn.session.RNValidicMobileSessionPackage; to the imports at the top of the file
    2. Add new RNValidicMobileSessionPackage() to the list returned by the getPackages() method
    include ':react-native-validic-session'
    project(':react-native-validic-session').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-validic-session/android')
    

  3. Insert the following lines inside the dependencies block in android/app/build.gradle:
implementation project(':react-native-validic-session')