🌐 Company Site - Here
🤗 Hugging Face - Here
🛟 Help Center - Here
🐳 Docker Hub - Here
Drop Android AAR + iOS framework → Sync Capacitor → run on a physical phone. Jump: Quick Start · Get the runtimes · Run the demo · Setup · JS API
- Install Node.js 18+ (includes npm)
- Install JDK 17
- Install Android Studio (Android) or Xcode 15+ (iOS, macOS only)
-
git clone https://github.com/Faceplugin-ltd/ID-Document-Recognition-Ionic-Capacitor.git -
cd ID-Document-Recognition-Ionic-Capacitor -
npm install -
npm run build -
cd example && npm install - Download runtimes → Get the runtimes
- Copy
documentreadersdk.aar→example/android/libdocsdk/ - Copy
docsdk.framework→ios/Frameworks/docsdk.framework(iOS) -
npm run build -
npx cap sync -
npx cap open androidornpx cap open ios - Run on a physical phone from Android Studio / Xcode
- Home status bar → Ready → Camera / Gallery / About
Own app? → Setup on your own app. Docs: https://doc.faceplugin.com
FacePlugin ID Document Recognition SDK for Ionic Capacitor is a fully on-device identity verification plugin for Android and iOS. Scan ID cards, passports, and driver licenses with OCR, MRZ, barcode and QR extraction, live camera overlay, gallery front/back, authenticity / document liveness, and Result / Security / Images / Raw JSON. Package: document-reader-capacitor. No biometric data leaves the device — built for KYC and hybrid mobile onboarding.
| Folder | Purpose |
|---|---|
| Repository root | document-reader-capacitor — Capacitor plugin you install in your Ionic app |
example/ |
Ionic React demo (Home, Camera, Gallery, Result, About) |
Native binaries are not on GitHub. Download them from Google Drive (links below).
Browser /
ionic servealone is not enough. Native Document Reader APIs require a Capacitor Android or iOS build on a device.
| Feature | Supported |
|---|---|
| ID Card, Passport, and Driver License recognition | ✓ |
| MRZ, Barcode, QR, and OCR data extraction | ✓ |
| Document detection and type classification | ✓ |
| Live camera locate overlay + Capture | ✓ |
| Gallery front / optional back | ✓ |
| Result (fields, Security, images, JSON) | ✓ |
| Authenticity / Security (document liveness) | ✓ |
| Platform | Repository |
|---|---|
| Android | ID-Document-Recognition-Android |
| iOS | ID-Document-Recognition-iOS |
| Windows | ID-Document-Recognition-Windows |
| Linux / Docker | ID-Document-Recognition-Docker |
| React Native | ID-Document-Recognition-React-Native |
| Flutter | ID-Document-Recognition-Flutter |
| Ionic Capacitor | ID-Document-Recognition-Ionic-Capacitor (this repo) |
| Ionic Cordova | ID-Document-Recognition-Ionic-Cordova |
| Linux / Docker (Liveness) | ID-Document-Liveness-Detection-Docker |
| Step | What you need |
|---|---|
| 1 | Node.js 18+, npm, Ionic / Capacitor |
| 2 | Physical device recommended (camera; emulator is limited) |
| 3 | Android documentreadersdk.aar and iOS docsdk.framework — Get the runtimes |
| 4 | Demo licenses are in example/src/license.ts (Android com.faceplugin.documentreader, iOS com.faceplugin.documentreader.app, valid until 12 August 2027). Request a new key only if you change applicationId / bundle id — SDK License |
| Item | Android | iOS |
|---|---|---|
| OS | API 24 min; API 29 (10)+ recommended | 13.0 min; 16+ recommended |
| Device | Physical phone with rear camera | iPhone with A12 or newer |
| Stack | Capacitor 6 + Ionic React (example/) |
Same |
| Build | Android Studio / JDK 17 | Xcode 15+, CocoaPods |
Binaries are gitignored. Copy them before your first native build.
Download: DocumentReader Android runtime (Google Drive)
| File | Example app path | Your own app path |
|---|---|---|
documentreadersdk.aar |
example/android/libdocsdk/documentreadersdk.aar |
node_modules/document-reader-capacitor/android/libs/documentreadersdk.aar |
Download: DocumentReader iOS runtime (Google Drive) — unzip if needed.
ios/Frameworks/docsdk.framework
Then npx cap sync ios / pod install. Framework is device arm64 only.
Follow these steps in order to run the demo.
- Install Node.js 18 or newer from https://nodejs.org/ (choose the LTS version). This also installs npm.
- Open a terminal (PowerShell, Terminal, or Command Prompt) and check:
node -v
npm -v- Install JDK 17 from https://adoptium.net/ (Temurin 17).
- Android: install Android Studio, open it once, and install the Android SDK + a device USB driver if needed.
- iOS (Mac only): install Xcode 15+ from the App Store, then open Xcode once and accept the license. Install CocoaPods if prompted (
sudo gem install cocoapods). - Plug in a physical phone and enable Developer / USB debugging (Android) or trust the computer (iPhone). Emulators are limited for camera.
git clone https://github.com/Faceplugin-ltd/ID-Document-Recognition-Ionic-Capacitor.git
cd ID-Document-Recognition-Ionic-CapacitorIf you do not use Git, download the ZIP from GitHub → Code → Download ZIP, unzip it, and cd into the folder.
From the repository root:
npm install
npm run buildThen install the example app:
cd example
npm installDownload the binaries from Get the runtimes, then copy them exactly here:
| Platform | File | Put it here |
|---|---|---|
| Android | documentreadersdk.aar |
example/android/libdocsdk/documentreadersdk.aar |
| iOS | docsdk.framework |
ios/Frameworks/docsdk.framework |
Create the folders if they do not exist. Do not rename the files.
Still inside example/:
npm run build
npx cap syncThis copies the web build into the native Android / iOS projects and links the Capacitor plugin.
Android
npx cap open android- Android Studio opens the
example/androidproject. - Wait until Gradle finishes syncing.
- Choose your USB phone in the device list.
- Press the green Run button.
iOS (macOS only)
npx cap open ios- Xcode opens the workspace.
- Select your Team under Signing & Capabilities.
- Choose your physical iPhone (not a simulator).
- Press Run.
docsdk.frameworkis device-only (arm64). Simulator builds may compile, but the engine will not activate on a simulator.
Keep these demo app ids so the included license works:
| Platform | Identifier |
|---|---|
Android applicationId |
com.faceplugin.documentreader |
| iOS bundle id | com.faceplugin.documentreader.app |
- Wait for the home status bar → Ready.
- Camera — live rear preview with document locate overlay → Capture → on-device OCR, MRZ, barcode, and authenticity checks.
- Gallery — pick front (back optional) → recognize two-sided IDs.
- Result — tabs Result / Security / Images / Raw JSON for fields, liveness, crops, and the full JSON response.
| Home | Camera | Gallery |
|---|---|---|
| Result | Security | Images |
|---|---|---|
| Raw JSON | About |
|---|---|
Licenses are offline and bound to your applicationId / bundle identifier.
The sample app already includes a valid key for com.faceplugin.documentreader (Android) / com.faceplugin.documentreader.app (iOS) (until 12 August 2027). You only need a new key if you use a different id.
The code below shows how to use the license:
ID-Document-Recognition-Ionic-Capacitor/example/src/license.ts
Lines 7 to 17 in d9f1fea
ID-Document-Recognition-Ionic-Capacitor/example/src/SdkContext.tsx
Lines 60 to 70 in d9f1fea
Please contact us to get a license for your own app.
After activation, getLicenseStatus reports what the key unlocks. Home shows the same summary on the status bar (for example Ready · Recognition + Liveness). About shows License: ….
| Capability | Meaning |
|---|---|
| Recognition | OCR, MRZ, barcode/QR, and document type classification |
| Liveness (authenticity) | Document authenticity: physical document, security patterns, photo origin, barcode format |
Typical labels:
- Recognition + Liveness — full identity verification (Result + Security tabs)
- Recognition — OCR, MRZ, and barcode only; Security stays empty / not checked
- Liveness — authenticity / document liveness only; OCR/MRZ/barcode stays empty / not checked
- Not licensed — until you activate
You need the document-reader-capacitor plugin, the native runtimes, and a few lines of TypeScript. You do not need the example pages unless you want the demo UI.
npm install git+https://github.com/Faceplugin-ltd/ID-Document-Recognition-Ionic-Capacitor.git
npx cap sync- Android AAR →
node_modules/document-reader-capacitor/android/libs/documentreadersdk.aar - iOS framework →
node_modules/document-reader-capacitor/ios/Frameworks/docsdk.framework
Then npx cap sync again.
import {
getMachineCode,
setActivation,
init,
recognize,
SDK_SUCCESS,
} from 'document-reader-capacitor';
const machine = await getMachineCode(); // FPMC1.…
const act = await setActivation(YOUR_FP1_LICENSE);
if (act !== SDK_SUCCESS) throw new Error('activation failed');
const code = await init();
if (code !== SDK_SUCCESS) throw new Error('init failed');
const json = await recognize(frontUri, backUri ?? null, true);For live locate, use startLivePreview(false), LocateSession, takeLiveSnapshot, and locateDocument (see example/src/components/DocumentCapture.tsx).
Public helpers:
| Method | Description |
|---|---|
getMachineCode() |
FPMC1.… for license requests |
setActivation(license) |
Activate with FP1.… |
getLicenseStatus() |
Recognition / Liveness flags + label |
init() / deinit() |
Load / unload engine |
locateDocument(image) |
Document locate JSON (corners + score) |
recognize(front, back?, authenticity?) |
OCR / MRZ / barcode → canonical JSON |
recognizeResult(...) |
Typed DocResult |
startLivePreview / stopLivePreview / takeLiveSnapshot |
Native camera under WebView |
LocateSession |
Poll locate for live overlay |
lastLicenseError() |
Last license error detail |
Status codes: 0 success, 1 invalid, 2 expired, 3 not activated, 4 init failed, 5 no database, 6 database load error.







