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. 1 Download BiometricidSDK.xcframework
  2. 2 Drag the framework into your Xcode project → General → Frameworks, Libraries, and Embedded Content
  3. 3 Set Embed to "Embed & Sign"
  4. 4 Add Camera Usage Description to Info.plist: NSCameraUsageDescription
Requirements: iOS 15.0+, iPhone X or newer (TrueDepth camera required), Xcode 15.0+

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 singleton

Main entry point for the SDK. Access via BiometricIDSDK.shared.

Properties

static property shared: BiometricIDSDK

Singleton instance. Use this to access all SDK functionality.

property isCoreMLModelLoaded: Bool @Published

Whether the CoreML model is loaded and ready for inference. Becomes true after successful config() call. Observable via Combine.

property 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

func async throws 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.

ParameterTypeDescription
apiKeyStringYour 16-character API key (uppercase + numbers)
Throws: BiometricIDError.apiKeyNotFound, .accountNotActive, .subscriptionInactive, .networkError
try await BiometricIDSDK.shared.config(with: "IVVM3FKBMAL2BKG9")
func 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.

ParameterTypeDescription
firstNameStringUser's first name
lastNameStringUser's last name
completionCompletionCallbackCalled with .success(BiometricidUser) or .failure(BiometricIDError)
UI: Presents full-screen guided capture view. User must look at camera from multiple angles. Average registration takes 10-15 seconds.
func 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.

ParameterTypeDescription
completionCompletionCallbackCalled with .success(BiometricidUser) or .failure(BiometricIDError)
Matching: Level 1 — master embedding cosine similarity (fast). Level 2 — detailed BioHash matching with score fusion IR 70% + RGB 30%.

BiometricidUser

struct Codable

Represents an authenticated user. Returned on successful registration or login.

Properties

property userId: String

Server-assigned unique user identifier.

property firstName: String

User's first name as provided during registration.

property lastName: String

User's last name as provided during registration.

property lastLoginDate: Date

Timestamp of the most recent login.

Initializer

init init(userId: String, firstName: String, lastName: String, lastLoginDate: Date)

Creates a new BiometricidUser instance. Typically constructed automatically from server response.

BiometricIDError

enum LocalizedError

All possible errors thrown or returned by the SDK.

CaseDescription
.apiKeyNotFoundAPI Key not found or invalid
.accountNotActiveAccount is not active
.subscriptionInactiveSubscription is not active
.userNotFoundUser not found during login
.userNotActiveUser account is not active
.userAlreadyExistsUser already exists during registration
.reachedMaximumNumberOfUsersMaximum number of users reached for this account plan
.networkError(String)Network connectivity error with details
.serverError(String)Server-side error with details
.userCancelledUser 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

enum

SDK configuration constants.

static property 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.

© 2026 BiometricID. All rights reserved.