FacePlugin
Get in Touch
React Native

Face Recognition SDK for React Native

A fully on-device React Native plugin covering face detection, landmarks, recognition, liveness, pose, expression, and attributes — published as the npm package face-recognition-sdk.

Fully on-deviceMIT-licensed pluginnpm package
Woman scanning her face with a phone for 1:1 verification on the React Native SDK
Identity Verified
Face Match 99.98%
Requirements

What You Need to Run It on React Native

These are the exact minimum and recommended requirements published in the FaceRecognition-LivenessDetection-ReactNative repository — check the repo directly for the latest version, since SDK requirements can change between releases.

Node.jsNode 18 / Node 20 recommended
AndroidminSdk 24, arm64-v8a / Android 10 or newer recommended
iOSiOS 15.0, arm64 device / iPhone 11 or newer recommended
RAM (device)4 GB / 6 GB or more
ExpoExpo Go is not supported (native code) — a development build is required
TestingPhysical device required — emulators and simulators are not for camera work
Quick Start

Install and Activate

Install the SDK, then activate it with a license key before calling any recognition function — every platform follows this same activate-then-initialize pattern.

  • Clone the repository next to your app and point face-recognition-sdk at it with a file: dependency in package.json, then run yarn install (or npm install).
  • Copy the native runtimes from the Android and iOS release pages: facerecognitionsdk.aar into the plugin’s android/libs/, and the iOS frameworks into its ios/Frameworks/, then run pod install.
  • Set your own applicationId / bundle ID, request a license for them, and add the camera and photo permissions. For the optional capture coach, also install react-native-vision-camera and react-native-svg.
typescript
import {
  getMachineCode, setActivation, init, getLicenseStatus,
  lastLicenseError, SDK_SUCCESS,
  faceDetection, templateExtraction, cropFace, similarity,
} from 'face-recognition-sdk';

const machine = await getMachineCode();     // send this when you request a key
const code = await setActivation('FP1....'); // bound to your applicationId / bundle ID
if (code !== SDK_SUCCESS) throw new Error(await lastLicenseError());
await init();

const faces = await faceDetection(imagePath);
if (faces.length === 1) {
  const template = await templateExtraction(imagePath, faces[0]);
  const crop = await cropFace(imagePath, faces[0]);
  // store the template and the crop in YOUR database
}
const score = await similarity(templateA, templateB);  // 1:1
Platform notes

React Native Integration Notes

Details from the React Native package README that differ from the other mobile platforms.

Prerequisites

Node 18 or newer, Yarn, and a React Native toolchain: Android Studio, and Xcode 15 or newer on macOS. Android needs minSdk 24 and arm64-v8a; iOS needs 15.0 and an arm64 device.

Rebuild the native app

Activation runs once at start-up, so a JavaScript reload is not enough after changing the key. demoLicense() picks the Android or iOS key at runtime.

iOS pods

Place the device frameworks in ios/Frameworks/ and run pod install in example/ios before the first iOS build.

Galleries are yours to store

The example app stores enrolled people locally. The release contains the native runtime only, never a person gallery, so persist templates in your own storage.

Success code

Activate once at start-up, then call the engine. SDK_SUCCESS (0) means success; any other value is an error code to log.

Related options: the Flutter package for a Dart codebase, or the Ionic plugins if your team ships a web-based mobile app.

Licensing

How Licensing Works

The React Native plugin is MIT-licensed. The native SDK runtime still requires an offline license key bound to your app ID or bundle ID — the demo app’s keys only work for its own demo package, so contact FacePlugin for a key for your app.

FAQ

Frequently Asked Questions

Does the React Native SDK send biometric data to the cloud?

No. Every stage of face recognition runs on your own server or directly on the device, depending on the platform – biometric templates never leave an environment you control.

How is the SDK licensed?

Licenses are offline and bound to the Android applicationId and iOS bundle id of your app. Contact FacePlugin with both identifiers to receive keys. There are no per-call or per-match fees once licensed.

Where can I see the full source and open an issue?

The FaceRecognition-LivenessDetection-ReactNative integration is maintained publicly on GitHub at github.com/Faceplugin-ltd, where you can browse the code, file issues, and track releases.

Related

Pairs Well With

Ready to Add Face Recognition to Your React Native App?

Talk to our team to get a license key and a 15-day evaluation period started.