React Native

Introduction

The React Native VoveSDK facilitates easy integration of ID verification and KYC (Know Your Customer) compliance into mobile applications, supporting both iOS and Android platforms. This wrapper abstracts the complexity of interacting with the native VoveSDK, providing a simplified, promise-based JavaScript API for React Native developers.

Requirements

  • React Native 0.71+

  • iOS 13.0+

  • Android minSdk 24, compileSdk 34

  • Kotlin 2.0.0+ (compatible with Expo SDK 54)

Installation

To include the React Native VoveSDK in your project, install it via npm or Yarn:

npm install @vove-id/react-native-sdk

or

yarn add @vove-id/react-native-sdk

This package comes bundled with all necessary native dependencies, so there's no need for additional modifications to your Podfile or build.gradle.

Permissions (iOS)

For VoveSDK to function properly, it is essential to request and obtain camera permission from the users. This permission is crucial for ID verification processes that require access to the device's camera. To request camera permission, add the following key to your Info.plist file:

Permissions (Android)

Add the necessary camera permission to your AndroidManifest.xml:

Usage

The core functionality of the VoveSDK is to perform ID verification through a straightforward function call, which manages the verification process based on a session token.

Initialize Vove SDK

To initialize the Vove SDK, use your public API key. This setup should ideally be done in the main entry file (e.g., App.js or index.js) as early as possible.

Starting ID Verification

To start the ID verification process, use the start function. This function requires a configuration object that includes the session token and optional settings.

Function Signature

Configuration Options (VoveStartConfig)

Parameter
Type
Required
Default
Description

environment

VoveEnvironment

Yes

-

VoveEnvironment.Production or VoveEnvironment.Sandbox

sessionToken

string

Yes

-

Token generated by your backend to initiate the session

showUI

boolean

No

true

Show/hide the SDK's built-in welcome and summary screens

exitAfterEachStep

boolean

No

false

Return control after each verification step

enableVocalGuidance

boolean

No

false

Enable voice instructions during verification

locale

VoveLocale

No

EN

Localize the verification UI

Return Type (VoveVerificationResult)

Example Usage

Verification Status Values (VoveStatus)

Status
Description

success

Verification completed successfully

pending

Verification requires manual review

cancelled

User canceled the verification

failure

Verification failed

max-attempts

Maximum verification attempts reached

Step-by-Step Verification with exitAfterEachStep

Enable exitAfterEachStep to get control back after each verification step. This is useful when you want to interleave custom screens or logic between verification steps.

Verification Steps (VoveVerificationStep)

Step
Description

LIVENESS

Liveness/selfie verification

ID_DOCUMENT

ID document capture

DRIVING_LICENSE

Driving license capture

ADDRESS_PROOF

Address proof document capture

CAR_REGISTRATION_CARD

Car registration document capture

DONE

All verification steps completed

Localization with VoveLocale

The SDK supports multiple languages for ID verification processes:

Locale
Language

VoveLocale.EN

English

VoveLocale.FR

French

VoveLocale.DE

German

VoveLocale.AR

Arabic

VoveLocale.AR_MA

Moroccan Arabic

Enabling Vocal Guidance

To enhance the user experience during ID verification, vocal guidance can be enabled. This feature provides audio instructions to help guide users through the verification process.

Hiding the Welcome and Summary Pages

Control whether the SDK displays its built-in welcome and summary screens using the showUI parameter. Set to false to fully manage the user experience within your app.

Max Attempts Callback

Listen for the max attempts callback to handle scenarios where users reach the maximum number of verification attempts:

Migration from v1.5.x to v1.6.x

Breaking Change: Return Type

The start() function now returns an object instead of a string:

Before (v1.5.x):

After (v1.6.x):

Troubleshooting

Common Issues:

  1. SDK not initializing: Ensure you call initialize() before start() and that your public key is correct.

  2. Camera permission denied: Make sure you've added the required permissions to Info.plist (iOS) and AndroidManifest.xml (Android).

  3. Kotlin version mismatch (Android): The SDK requires Kotlin 2.0.0+. If using Expo SDK 54 or React Native 0.81+, ensure your project is configured for Kotlin 2.0.

  4. Session token errors: Verify the session token is correctly generated by your backend and hasn't expired.

Support

For further assistance or inquiries about the React Native VoveSDK, please reach out to our support team at [email protected].

Last updated