Installation Guide
Install and configure Certta for Flutter. Learn SDK requirements, module selection, permissions, session setup, runtime token updates, and color theming.
This guide covers caf_sdk 2.4.0 and above (Certta DevX). For the previous CafSdk sequential flow, see the legacy documentation.
Installing the SDK for Flutter
This guide walks you through the setup required to download, configure, and initialize Certta (caf_sdk 2.4.0+) in a Flutter app.
Check out the example app for a complete implementation example.
Requirements
Flutter
3.3.0+
Dart
3.9.0+
Android minSdk
26
Android compileSdk
36+
Kotlin
1.8+
Gradle
8.0+
Android Gradle Plugin (AGP)
8.0+
iOS deployment target
15.0+
Xcode
14.0+
Swift
5.0+
Step 1: Install the SDK
flutter pub add caf_sdkThe published package version is 2.4.0. Import the Certta DevX API with:
Step 2: Configure module selection
Create a caf-modules-config.json file in your project root (next to pubspec.yaml) to choose which native modules to bundle:
Set to true the modules you want to use.
For a single provider, livenessProviders can be a string. Allowed values are iproov-lite, iproov-full, payface, and facetec. To use several providers, use an array:
iProov and Protobuf
iproov-lite: use when your app targets Protobuf JavaLite — the usual choice for a smaller Android binary.iproov-full: use when you need Protobuf Java (full) together with iProov.
If you include the PayFace provider, you must also use iProov Lite (iproov-lite). PayFace is built against Protobuf JavaLite; mixing it with iproov-full causes Protobuf dependency conflicts at build time.
Fingerprint
The Fingerprint module is optional (fingerprint, boolean). It defaults to false. To enable it, set "fingerprint": true.
Fingerprint is collected as part of the liveness flow, so it is only bundled when faceLiveness or faceLivenessUI is also enabled. Setting "fingerprint": true without a liveness module has no effect.
Contact CAF Support to request activation on the backend. If it is not enabled on our side, the SDK will not trigger the fingerprint library even if the property is true locally.
Step 3: Android configuration
Configure the repositories block in your project's android/build.gradle.kts (usually at the root level):
Step 4: iOS configuration
Navigate to the ios/ directory of your Flutter project and run:
This step is mandatory so iOS can link the native modules.
Re-run
pod installwhenever native dependencies are added or updated.
Permissions
Android
Declare the following in AndroidManifest.xml:
Face Liveness
android.permission.CAMERA
Camera access for face verification (liveness).
Mandatory
android.permission.INTERNET
Communication with authentication and verification services (HTTPS/WSS).
Mandatory
Document Detector
android.permission.CAMERA
Camera access to capture document images.
Only for capture
android.permission.INTERNET
Upload captured images for processing and validation.
Mandatory
android.permission.READ_EXTERNAL_STORAGE
Access stored files when document upload is enabled.
Only for upload
iOS
Declare the following in Info.plist:
Face Liveness
NSCameraUsageDescription
Camera access for face verification (liveness).
Mandatory
Network access
Communication with authentication and verification services (HTTPS/WSS).
Mandatory
Document Detector
NSCameraUsageDescription
Camera access to capture document images.
Only for capture
Network access
Upload captured images for processing and validation.
Mandatory
NSPhotoLibraryUsageDescription
Access stored files when document upload is enabled.
Only for upload
Configuring the session
To generate your mobile token, follow this guide:
Initialize Certta once you have a valid mobile token (JWT) and user ID — typically after login:
You can confirm the session with await certta.isInitialized().
CerttaConfiguration parameters
mobileToken
String
CAF mobile JWT from your backend.
userId
String
End-user identifier.
environment
CafEnvironment
Backend environment: prod, beta, or dev.
securityEnabled
bool
Enables security checks. Default true.
Runtime configuration updates
userId and mobileToken can be updated after the initial configureSdk without repeating the full configuration. Call these after login, logout, or token refresh:
Use these methods whenever your app performs logout/login or when your backend issues a refreshed JWT so Certta stays synchronized with the active session.
Logs
SDK pipeline logs are emitted on CerttaSdk.logStream:
Color theming
Face Liveness and Document Detector support custom colors so the SDK UI can match your brand. Pass hexadecimal strings (for example "#RRGGBB") on CafColorConfiguration when you call configureSdk.
primaryColor
Main color for buttons and highlights.
secondaryColor
Secondary color for complementary elements.
backgroundColor
Screen background color.
contentColor
Color used for texts and icons.
mediumColor
Neutral color for elements like progress bars.
dialogBackgroundColor
Dialog and popup background color.
dialogBorderColor
Dialog and popup border color.
Language
Android
The language follows the device locale with no extra configuration.
iOS
Configure Localizations and CFBundleLocalizations in Xcode:
After these settings, the SDK uses the device language.
Code obfuscation
Add the following ProGuard/R8 rules to android/app/proguard-rules.pro so the SDK and its dependencies keep working after obfuscation.
Next steps
Face LivenessDocument DetectorLast updated

