FacePlugin
Get in Touch
Ionic

Face Recognition SDK for Ionic

An on-device face recognition and liveness plugin for Ionic apps on Android and iOS, published for both Capacitor and Cordova — face detection, 1:N identification, landmarks, and attributes, all processed on the device.

Capacitor & Cordova buildsFully on-deviceMIT-licensed plugin
Woman scanning her face with a phone for 1:1 verification on the Ionic SDK
Identity Verified
Face Match 99.98%
Requirements

What You Need to Run It on Ionic

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

IonicCapacitor plugin (face-recognition-capacitor) or Cordova plugin (face-recognition-cordova)
Node.jsNode 18 / Node 20 recommended
AndroidAPI 24, arm64-v8a / Android 10 or newer recommended
iOSiOS 13.0, arm64 device / iPhone 11 or newer recommended
RAM (device)4 GB / 6 GB or more
Browser previewionic serve alone can’t load the native engine — test on a physical device
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 Capacitor repository next to your app and build the plugin once (npm install && npm run build). Add it to your app with a file: dependency on face-recognition-capacitor, then run npm install and npx cap sync.
  • 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 npx cap sync again.
  • Set your own applicationId / bundle ID, request a license for them, and add the camera and photo permissions for both platforms.
typescript
import {
  getMachineCode, setActivation, init, getLicenseStatus,
  faceDetection, templateExtraction, cropFace, similarity, SDK_SUCCESS,
} from 'face-recognition-capacitor';

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('activation failed');
await init();

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

Building with Cordova instead of Capacitor?

FacePlugin also publishes a Cordova build at FaceRecognition-LivenessDetection-Ionic-Cordova, with the same on-device engine and licensing model. Copy its FacePlugin/ folder into your app, place the Android AAR and iOS frameworks inside it, then run ionic cordova plugin add ./FacePlugin. Its TypeScript API is published as face-recognition-cordova.

Platform notes

Ionic Integration Notes

FacePlugin ships two Ionic integrations, a Capacitor plugin and a Cordova plugin. These notes cover the differences.

Capacitor: build, then sync

Run npm install && npm run build, then cd example && npm install. After changing the license, rebuild and run npx cap sync; a web reload is not enough because activation happens once at start-up.

Capacitor toolchain

Node 18 or newer, JDK 17, Android Studio for Android, and Xcode 15 or newer with CocoaPods on macOS for iOS. Android needs API 24 and arm64-v8a.

Cordova on Windows

Do not add the iOS platform on Windows. Add iOS only on macOS, after placing the frameworks, and put your Apple Team ID in build.json.

Gradle is bootstrapped

scripts/with-gradle.js sets up Gradle for Cordova builds, so you do not need to set GRADLE_HOME by hand.

Match threshold default

The example sets matchThreshold: 0.8 while startVideoWorker defaults to 0.67, so check which one your flow is using before comparing results.

Real device with debugging on

Use a physical phone with USB debugging (Android) or a trusted computer (iPhone). Emulators and the simulator have no usable camera for liveness.

For the other hybrid framework see React Native; for Microsoft stacks see .NET MAUI.

Licensing

How Licensing Works

The Ionic plugin code 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 key only works for its own demo package, so contact FacePlugin for a key for your app.

FAQ

Frequently Asked Questions

Does the Ionic 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. The Capacitor and Cordova plugins use the same license. 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-Ionic-Capacitor 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 Ionic App?

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