2.4.0 • Published 5 years ago

react-native-kyc-library v2.4.0

Weekly downloads
29
License
-
Repository
-
Last release
5 years ago

react-native-kyc-library

Getting started

$ npm install --save react-native-kyc-library

Mostly automatic installation

$ react-native link react-native-kyc-library

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-kyc-library and add RNKycLibrary.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNKycLibrary.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNKycLibraryPackage; to the imports at the top of the file
  • Add new RNKycLibraryPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-kyc-library'
    project(':react-native-kyc-library').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-kyc-library/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-kyc-library')

Post Installation Steps

Android

  1. Append the following lines to android/settings.gradle:
      include ':kycLib-release'
      project(':kycLib-release').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-kyc-library/android/kycLib-release')
  2. Add Java 1.8 compile options to android/app/build.gradle
     compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  3. Exclude already imported dependancies. Eg:
    compile (project(':react-native-kyc-library')) {
          exclude group: 'com.android.support', module: 'support-v4'
          exclude group: 'org.apache.commons', module: 'commons-compress'
      }

Usage

import RNKycLibrary from 'react-native-kyc-library';

RNKycLibrary.navigateToKYCApp(<Reference ID>, <API Token>);

Please refer Sample Project

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.1.0-0

6 years ago

1.0.0

6 years ago