π Company Site - Here
π€ Hugging Face - Here
π Help Center - Here
π³ Docker Hub - Here
Unzip
docsdk.framework.zipinto this folder β run on a physical iPhone (~10 min after Xcode is ready). Jump: Quick Start Β· Get the framework Β· Run the demo Β· License Β· Integrate
Use this for the sample app (check each box in order).
- Clone ID-Document-Recognition-iOS on a Mac
- Xcode 15+ (project compatibility Xcode 14; Swift 5)
- Download
docsdk.framework.zipβ Get the framework - Unzip and put
docsdk.frameworknext toDocumentReader.xcodeproj(not the.zip) - Open DocumentReader.xcodeproj
- Set your Signing Team; keep bundle id
com.faceplugin.documentreader.appfor the demo license (until 12 Aug 2027) - Run on a physical iPhone (simulator is not recommended)
- Grant camera when asked
- Home status bar shows Ready β Camera / Gallery / About
Own app? β Setup on your own app. Full integration: https://doc.faceplugin.com
FacePlugin Document Reader SDK for iOS β on-device ID card, passport, and driver license recognition (OCR, MRZ, barcode). This repository is the standalone iOS demo. The runtime is docsdk.framework (download from Google Drive). No other FacePlugin repository is required.
This is an on-premise SDK. All processing stays on the device β no biometric data is sent to FacePlugin cloud.
Native binaries are not on GitHub. Download the framework from the Drive link below.
| Feature | Supported |
|---|---|
| ID Card / Passport / Driver License | β |
| MRZ / Barcode / QR / OCR | β |
| Live camera locate overlay + Capture | β |
| Gallery (front required, back optional) | β |
| Result (fields, images, JSON) | β |
| About | β |
| Platform | Repository |
|---|---|
| Android | ID-Document-Recognition-Android |
| iOS | ID-Document-Recognition-iOS (this repo) |
| Windows | ID-Document-Recognition-Windows |
| Linux / Docker | ID-Document-Recognition-Docker |
| React Native | ID-Document-Recognition-React-Native |
| Flutter | ID-Document-Recognition-Flutter |
| Ionic Cordova | ID-Document-Recognition-Ionic-Cordova |
| Step | What you need |
|---|---|
| 1 | Xcode 15+ and a physical iPhone (simulator is not recommended) |
| 2 | docsdk.framework in this folder β Get the framework |
| 3 | Demo license is already in the repo (licenseKey for com.faceplugin.documentreader.app, valid until 12 August 2027). Request a new key only if you change the bundle identifier β SDK License |
Camera and Gallery unlock when the status bar shows Ready.
| Item | Minimum | Recommended |
|---|---|---|
| Host | macOS with Xcode 15+, Swift 5.0 | Same |
| iOS | 13.0 (IPHONEOS_DEPLOYMENT_TARGET) |
16 or newer |
| Device | iPhone with A12 or newer | Recent iPhone |
| RAM | 4 GB | 6 GB or more |
| Camera | Rear camera | Auto-focus, 1080p |
| Device | Physical device | Same; simulator is not for camera |
docsdk.framework is a header stub on GitHub because the binary is too large. On Drive it is shipped as docsdk.framework.zip β unzip after you download.
DocumentReader-iOS-App runtime (Google Drive) β file: docsdk.framework.zip
git clone https://github.com/Faceplugin-ltd/ID-Document-Recognition-iOS.git
cd ID-Document-Recognition-iOS- Download
docsdk.framework.zipfrom the Drive folder. - Unzip it (double-click in Finder, or
unzip docsdk.framework.zip). You should get adocsdk.frameworkfolder β not the.zip. - Put
docsdk.frameworkhere (repo root, next toDocumentReader.xcodeprojβ not in a nested folder, and not the zip file):
ID-Document-Recognition-iOS/
βββ DocumentReader.xcodeproj
βββ DocumentReader/
βββ docsdk.framework/ β unzipped (not .zip; engine is nested as Frameworks/dcrcore.framework)
If unzip creates docsdk.framework in Downloads, move that folder into this repo. You can delete the .zip afterward.
- Open DocumentReader.xcodeproj in Xcode.
- Set your Team for signing. Bundle ID is
com.faceplugin.documentreader.app. - Run on a device. The demo already has a valid
licenseKeyforcom.faceplugin.documentreader.app. - Wait for the status bar at the bottom of Home:
Loading native SDKβ¦β Ready. Camera and From Gallery stay disabled until then.
Home tiles are one row under the title: Camera | Gallery | About.
- Camera β live document overlay; tap Capture when the score is ready (β₯ 50%).
- Gallery β pick Front (required) and Back (optional), then Recognize.
- Result β extracted OCR / MRZ / barcode fields and images.
Licenses are offline and bound to your bundle identifier.
The sample app already includes a valid key for com.faceplugin.documentreader.app (until 12 August 2027). You only need a new key if you use a different bundle identifier.
The code below shows how to use the license:
ID-Document-Recognition-iOS/DocumentReader/ViewController.swift
Lines 14 to 15 in be88a3a
ID-Document-Recognition-iOS/DocumentReader/ViewController.swift
Lines 147 to 149 in be88a3a
Please contact us to get a license for your own app.
You need docsdk.framework and DocSDK. You do not need this demoβs ViewController / CameraViewController.
- Copy
docsdk.frameworkinto your project root (Drive). - In Xcode: General β Frameworks, Libraries, and Embedded Content β add it (Embed & Sign).
- Add a bridging header (Swift):
#import <docsdk/DocSDK.h>β Project Navigator β Build Settings β Swift Compiler - General β Objective-C Bridging Header. - Request a license for your bundle identifier, not the demoβs.
- Call
initSDKand all process methods off the main thread.
Full wiring, permissions, and result JSON: https://doc.faceplugin.com
// Bridging header: #import <docsdk/DocSDK.h>Call order (background queue): getMachineCode β setActivation β initSDK β recognize / locateDocument. 0 = DocSDKSuccess. Process methods return JSON.
DispatchQueue.global(qos: .userInitiated).async {
var ret = DocSDK.setActivation("FP1.β¦")
if ret == 0 {
ret = DocSDK.initSDK()
}
}| Method | Role |
|---|---|
getMachineCode / setActivation / initSDK / deinitSDK |
License + engine lifecycle |
locateDocument(_:) |
Live corners + score (overlay, no OCR) |
recognize(_:) |
OCR / MRZ / barcode from one image |
recognizeFront(_:back:authenticity:) |
Front + optional back (back may be nil) |
documentAuthenticity(_:) |
Optional authenticity check |
| Code | Constant | Status |
|---|---|---|
| 0 | DocSDKSuccess |
Activate / init OK |
| 1 | DocSDKLicenseInvalid |
Invalid license |
| 2 | DocSDKLicenseExpired |
Expired license |
| 3 | DocSDKNotActivated |
Not activated |
| 4 | DocSDKInitFailed |
Init failed |
| Symptom | What to check |
|---|---|
Missing / stub docsdk.framework |
Unzip Drive zip into repo root next to DocumentReader.xcodeproj β not the .zip |
| License invalid / expired | Bundle id must be com.faceplugin.documentreader.app for the demo key |
| Camera / Gallery disabled | Wait until the status bar shows Ready |
| Simulator | Use a physical iPhone; simulator is not for camera |
| Signing / Team | Xcode β Signing & Capabilities β pick your Team |


