BiometricID SDK
v1.0 — iOS Face Recognition Framework
BiometricID SDK provides enterprise-grade biometric face recognition for iOS applications. It uses TrueDepth IR camera (940nm) for 3D facial geometry capture and CoreML-powered AdaFace IR101 model for on-device 512-dimensional embedding generation.
<50ms
Embedding generation
99.7%
Recognition accuracy
256-bit
AES-GCM encryption
Installation
-
1
Download
BiometricidSDK.xcframework - 2 Drag the framework into your Xcode project → General → Frameworks, Libraries, and Embedded Content
- 3 Set Embed to "Embed & Sign"
-
4
Add Camera Usage Description to
Info.plist:NSCameraUsageDescription
Quick Start
import BiometricidSDK // 1. Configure SDK with your API key try await BiometricIDSDK.shared.config(with: "YOUR_API_KEY") // 2. Register a new user BiometricIDSDK.shared.registerUser( firstName: "John", lastName: "Doe" ) { result in switch result { case .success(let user): print("Registered: \(user.userId)") case .failure(let error): print("Error: \(error.localizedDescription)") } } // 3. Login existing user BiometricIDSDK.shared.login { result in switch result { case .success(let user): print("Welcome, \(user.firstName)!") case .failure(let error): print("Login failed: \(error.localizedDescription)") } }
Public API
BiometricIDSDK
class singletonMain entry point for the SDK. Access via BiometricIDSDK.shared.
Properties
shared: BiometricIDSDK
Singleton instance. Use this to access all SDK functionality.
isCoreMLModelLoaded: Bool
@Published
Whether the CoreML model is loaded and ready for inference. Becomes true after successful config() call. Observable via Combine.
configurationError: BiometricIDError?
@Published
Contains error details if configuration failed. nil on success. Observable via Combine.
Type Aliases
CompletionCallback = (Result<BiometricidUser, BiometricIDError>) -> Void
Callback type used by registerUser and login methods. Returns either a BiometricidUser on success or a BiometricIDError on failure.
Methods
config(with apiKey: String)
Configure the SDK with your API key. Validates the key against the server, checks account/subscription status, and preloads the CoreML model in the background.
| Parameter | Type | Description |
|---|---|---|
apiKey | String | Your 16-character API key (uppercase + numbers) |
BiometricIDError.apiKeyNotFound, .accountNotActive, .subscriptionInactive, .networkError
try await BiometricIDSDK.shared.config(with: "IVVM3FKBMAL2BKG9")
registerUser(firstName: String, lastName: String, completion: @escaping CompletionCallback)
Register a new user with biometric face data. Presents a full-screen guided face capture UI that walks the user through multi-angle face scanning using both IR and RGB cameras. Captured embeddings are encrypted and sent to the server.
| Parameter | Type | Description |
|---|---|---|
firstName | String | User's first name |
lastName | String | User's last name |
completion | CompletionCallback | Called with .success(BiometricidUser) or .failure(BiometricIDError) |
login(completion: @escaping CompletionCallback)
Authenticate an existing user via face recognition. Presents a full-screen camera view that automatically captures 6 dual-modal frames (IR + RGB) at 200ms intervals. Computes a master embedding, encrypts all data with ECIES, and sends to server for two-level matching.
| Parameter | Type | Description |
|---|---|---|
completion | CompletionCallback | Called with .success(BiometricidUser) or .failure(BiometricIDError) |
BiometricidUser
struct CodableRepresents an authenticated user. Returned on successful registration or login.
Properties
userId: String
Server-assigned unique user identifier.
firstName: String
User's first name as provided during registration.
lastName: String
User's last name as provided during registration.
lastLoginDate: Date
Timestamp of the most recent login.
Initializer
init(userId: String, firstName: String, lastName: String, lastLoginDate: Date)
Creates a new BiometricidUser instance. Typically constructed automatically from server response.
BiometricIDError
enum LocalizedErrorAll possible errors thrown or returned by the SDK.
| Case | Description |
|---|---|
.apiKeyNotFound | API Key not found or invalid |
.accountNotActive | Account is not active |
.subscriptionInactive | Subscription is not active |
.userNotFound | User not found during login |
.userNotActive | User account is not active |
.userAlreadyExists | User already exists during registration |
.reachedMaximumNumberOfUsers | Maximum number of users reached for this account plan |
.networkError(String) | Network connectivity error with details |
.serverError(String) | Server-side error with details |
.userCancelled | User dismissed the biometric capture UI |
.biometricFailed(String) | Biometric capture or processing failed |
.authenticationFailed(String) | Authentication check failed |
.unknown(String) | Catch-all for unexpected errors |
BiometricIDConstants
enumSDK configuration constants.
baseURL: String
Production server URL. Default: "https://biometricid.eu.com:8002"
Security
Security Overview
BiometricID SDK implements multiple layers of security to protect biometric data throughout the entire pipeline.
On-Device Processing
All face recognition and embedding generation happens on-device using CoreML. Raw images never leave the device — only encrypted mathematical representations are transmitted.
End-to-End Encryption
All data in transit is protected with AES-256-GCM encryption and ECIES (Elliptic Curve Integrated Encryption Scheme) with Perfect Forward Secrecy.
Privacy-Preserving Templates
Biometric data is stored as one-way cryptographic templates (BioHash). It is mathematically impossible to reconstruct facial images from stored data.
Runtime Protection
Built-in runtime security checks protect against tampering, reverse engineering, and hostile environments.
Data Isolation
Multi-tenant architecture with complete data isolation. Each API key maps to an isolated database — no cross-tenant access is possible.