πŸ“±React-Native SDK

react-native-enroll SDK

General Notes:

  • Package is only usable for react-native 0.74.0+

  • run npm i react-native-enroll --save

Android

  • open your app android project settings.gradle and add these lines in the top of the file.

  • make sure your minSdk is 24

import org.gradle.api.initialization.resolve.RepositoriesMode
pluginManagement {
    repositories {
        mavenCentral()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url 'https://maven.innovatrics.com/releases'
            allowInsecureProtocol = true
        }
        maven { url 'https://jitpack.io' }
    }
}
dependencyResolutionManagement{
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories{
        mavenCentral()
        google()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url 'https://maven.innovatrics.com/releases'
            allowInsecureProtocol = true
        }
    }
}
  • After this line apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) Add:

  • Finally, ask for your license then drag and drop it to your project navigator files with copy files if needed checked and check all your targets.

  • now run react-native run-android

ios

  • in your podfile for your ios xcode project add these lines:

  • add the following to your project info.plist file

  • Finally, ask for your license then drag and drop it to your project navigator files with copy files if needed checked and check all your targets.

use the sdk in react-native as follows:

and the launch as follows:

You can also include enrollColors if needed