For the complete documentation index, see llms.txt. This page is also available as Markdown.

React Native

Faceplugin Face Recognition React Native SDK. On-premise 1:1 and 1:N matching with 2D liveness. face-recognition-sdk plugin, Yarn 3, not Expo Go.

Fully on-premise Face Recognition SDK for React Native (Android and iOS). Package: face-recognition-sdk. It wraps the same native engines as the Android and iOS Face Recognition SDKs.

All processing stays on the device. No biometric data is sent to Faceplugin cloud.

Code

How to Run

1

Install tools

Node 18+, Yarn, and a React Native environment (setup guide). Physical phone recommended (emulator is limited for camera / liveness).

2

Clone and install

3

Place native runtimes

Native binaries are not on GitHub (too large).

Platform
File
Example app path
Your own app path

Android

facerecognitionsdk.aar

example/android/libfacesdk/

node_modules/face-recognition-sdk/android/libs/

iOS

three frameworks

ios/Frameworks/

node_modules/face-recognition-sdk/ios/Frameworks/

4

Run on a phone

On macOS for iOS:

Open example/ios/FaceRecognitionSdkExample.xcworkspace in Xcode if you prefer. Wait until the home status bar shows Ready.

Keep the demo package name com.faceplugin.facerecognitionsdk on Android and iOS so the sample key works.

Requirement
Value

React Native

0.74.x (example ships 0.74.5)

Android

minSdk 24, physical device recommended

iOS

iOS 13+, A12+ recommended, physical device

Demo tile
What it does

Enroll

Enroll a person from a gallery photo (exactly one face) into the on-device database

Identify

Live 1:N camera match (VideoWorker) with 2D liveness

Capture

Oval coach capture → still with attributes → optional enroll

Attribute

Gallery analysis: landmarks, liveness, pose, quality, age, gender, emotion

Settings

Camera lens, identify / liveness / pose / eye-close thresholds

About

SDK name and license label

Screenshots

The gallery is Android sample UI from faceplugin-assets. The React Native plugin wraps the same native engines; there is no separate RN photoshoot in these docs.

Home
Identify
Capture

Faceplugin Face Recognition Android sample UI (shown on the React Native page; no separate RN screenshot yet)

Faceplugin Face Recognition live identify

Faceplugin Face Recognition oval capture

License

Licenses are offline. The sample key is only for the demo app. Request a new license key for your own app.

Default thresholds in Settings: identify 0.67, liveness 0.5, pose 40°, eye-close 0.5.

Request a License & Support.

Integrate into your own app

  1. Copy facerecognitionsdk.aar into node_modules/face-recognition-sdk/android/libs/

  2. Copy the three iOS frameworks into node_modules/face-recognition-sdk/ios/Frameworks/ and pod install

  3. Call setActivation → init before detect / VideoWorker

  4. For the optional oval UI (FaceCapture), also install peers: react-native-vision-camera, react-native-svg, plus camera permissions

Live frames: pass ingestLiveCameraFrame(photo, { frontCamera: true }) so Android and iOS share one orientation policy.

Optional Capture UI:

Person enrollment data in the example is local (AsyncStorage). Drive holds the native runtime only, not the enrolled gallery.

APIs

Call order: getMachineCode → setActivation → init → detect / VideoWorker → deinit.

One TypeScript API for Android and iOS. Results use the same FaceBox shape on both platforms (Android is normalized for you). All methods return Promises.

Status codes: 0 Success, 1 Invalid license, 2 Expired, 3 Not activated, 4 Init failed.

setActivation: This API is used to activate the SDK

init: This API is used to initialize the SDK

getMachineCode: This API is used to retrieve the machine code

getLicenseStatus: This API is used to read license status

faceDetection: This API is used to detect faces

FaceBox includes x1,y1,x2,y2, liveness / livenessLabel, age / gender / emotion, glasses / mask, attributes, and landmarks. Optional: normalizeFaceBox if you parse raw bridge JSON yourself.

templateExtraction: This API is used to extract face template

Input

Image URI / path / base64, and a detected FaceBox.

Return value

Template as base64. Store it in your database.

similarity: This API is used to calculate similarity between two templates

detect: This API is used to detect faces and return engine JSON

Also: extractFeature, quality, cropFace, setLandmarkMode / getLandmarkMode (14 / 68 / 468), lastLicenseError, deinit, estimatorStatus.

VideoWorker: This API is used for live 1:N identify

Prefer ingestLiveCameraFrame so rotation is handled for you.

Request a License & Support · Contact us

FAQ

Package? face-recognition-sdk. Yarn 3; not Expo Go.

Screenshots? The gallery uses Android sample UI. The plugin wraps native Android and iOS engines.

Liveness Flutter/React Native SDK? None public. Identify includes 2D liveness.

Last updated