Install
Add the SenseCrypt Authenticator SDK to an iOS or Android project — artifact placement, the development license, required dependencies, and camera permissions.
Before you start
You need two things from SenseCrypt, both issued out of band — neither is downloadable and neither may be committed to source control:
| Item | What it is |
|---|---|
| SDK artifacts | A versioned Android .aar and an iOS Swift package. Delivered from a private artifact store you'll be granted read access to. |
mobile.lic | Your development license. The SDK refuses to initialize its inference engine without it. Licenses carry an expiry. |
Add both to .gitignore before you add them to the project. The license is customer-specific and the artifacts contain licensed model weights.
iOS
Add the Swift package.
The SDK ships as a local Swift package containing a static-library XCFramework. Place the package directory inside your repository — for example at ios/sdk/ — and add it to your Xcode project as a local package reference (File ▸ Add Package Dependencies… ▸ Add Local…), then add the SenseCryptAuthenticatorSDK library to your app target.
Requires iOS 15 or later, and Swift tools 5.9 (Xcode 15+).
Add the license to your app bundle.
Drop mobile.lic into your app target's resources — for example YourApp/Resources/mobile.lic — and confirm it appears under Build Phases ▸ Copy Bundle Resources.
The SDK reads it from Bundle.main. If your Xcode project uses a file-system-synchronized group, dropping the file into the folder is enough; otherwise add it to the target explicitly.
Declare camera usage.
Add NSCameraUsageDescription to your app target's Info.plist:
<key>NSCameraUsageDescription</key>
<string>Used to verify your identity with a face scan.</string>The SDK cannot inject this key — it must live on your app target. Without it, iOS terminates the app the moment the camera is requested.
Android
Add the AAR.
Copy the artifact to app/libs/sensecrypt-authenticator-sdk.aar and reference it directly:
dependencies {
implementation(files("libs/sensecrypt-authenticator-sdk.aar"))
}Requires minSdk 24 or higher — the AAR declares minSdkVersion="24".
Add the required runtime and compile dependencies.
An AAR does not carry transitive dependencies, so these must be declared by your module. Each one is required — the failure mode for omitting it is listed.
dependencies {
implementation(files("libs/sensecrypt-authenticator-sdk.aar"))
// JNA — the bridge UniFFI's Kotlin bindings use to call into the
// Rust core. The `@aar` classifier pulls the Android build that
// includes libjnidispatch.so per ABI.
// Omitting it: NoClassDefFoundError: com.sun.jna.Structure on the
// first open() call.
// Use 5.15.0 or newer — earlier releases ship a 4 KB-aligned
// libjnidispatch.so that fails Play's 16 KB page-size check for
// apps targeting Android 15+.
runtimeOnly("net.java.dev.jna:jna:5.17.0@aar")
// The AAR's compiled binary XML references ConstraintLayout and
// Material attributes through the `app:` namespace; AAPT2 resolves
// those against your R at link time, so they must be on your
// compile classpath even if your own UI never uses them.
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.android.material:material:1.12.0")
// CameraX — backs the bundled QR-scan and face-capture surfaces.
implementation("androidx.camera:camera-core:1.4.0")
implementation("androidx.camera:camera-camera2:1.4.0")
implementation("androidx.camera:camera-lifecycle:1.4.0")
implementation("androidx.camera:camera-view:1.4.0")
// ViewBinding — pin to your AGP version.
// Omitting it: NoClassDefFoundError: ViewBinding when an SDK scan
// surface is instantiated.
runtimeOnly("androidx.databinding:viewbinding:9.2.1")
}Pin androidx.databinding:viewbinding to the version matching your Android Gradle Plugin, not the version above.
Add the license to assets.
Place mobile.lic at app/src/main/assets/mobile.lic.
Confirm permissions.
The AAR already declares what it needs, and manifest merger folds these into your app:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.any" android:required="true" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />You do not need to redeclare them. You do still need to request the CAMERA runtime permission — unless you use the bundled UI surfaces, which request it for you and report PermissionDenied if the user declines.
android.hardware.camera.any is declared required="true", which means Google Play will hide your app from devices with no camera at all.
Verifying the install
The install is correct when open() returns a handle and initializeInferenceEngine() completes without throwing. Both are covered in Initialization.
Two checks that catch the most common mistakes early:
- Architecture. On Android, confirm you are running on an ARM device or ARM emulator image. The AAR has no x86 slices, so an x86_64 emulator fails when the native library loads.
- License. A
LicenseNotFounderror means the file isn't in the bundle or assets at all — a packaging problem, not a licensing one. See Errors.
Keeping the SDK updated
The artifacts are versioned, and the iOS package and Android AAR must come from the same SDK version — they share a Rust core and a wire protocol with the portal. Don't mix versions across platforms in one release.
Related
- Initialization —
open()and engine loading. - Errors — every failure case.
- UI components — the bundled camera surfaces.
Mobile SDK overview
Embed SenseCrypt face authentication directly in your own iOS or Android app — device-bound keys, on-device face matching and liveness, and the five authentication flows.
Initialization
Open the SenseCrypt Authenticator SDK, configure the portal and tenant, and load the on-device inference engine.