Installation Guide
Install and configure Certta for React Native. Learn SDK requirements, module selection, permissions, session setup, runtime token updates, and color theming.
Installing the SDK for React Native
This guide walks you through the setup required to download, configure, and initialize Certta (@caf.io/react-native-sdk 5.4.0+) in a React Native app.
Requirements
React Native
React Native Version
0.73.x
Node.js
18
Android
Android SDK API - minimum version (minSdk)
26
Android SDK API - compile version (compileSdk)
36
Kotlin
1.9.10
Gradle
8.4
Android Gradle Plugin (AGP)
8.3.2
iOS
iOS Deployment Target
15.0
Xcode
26.0
Swift
5.10
Step 1: Install the SDK
The published package version is 5.4.0. Import Certta DevX hooks from the main package:
Step 2: Configure module selection
When using Expo, caf-modules-config.json is generated from app.json. Add the plugin:
Create caf-modules-config.json in your app root:
Set each module flag to true to include it, or false to exclude it.
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.
Fingerprint
The Fingerprint module is optional (fingerprint, boolean). It defaults to false. Fingerprint is collected as part of the liveness flow, so it is only bundled when faceLiveness or faceLivenessUI is also enabled.
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 React Native 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:
CerttaConfiguration parameters
mobileToken
string
CAF mobile JWT from your backend.
userId
string
End-user identifier.
environment
CafEnvironment
Backend environment: PROD, BETA, or DEV.
securityEnabled
boolean
Enables security checks. Default true.
Runtime configuration updates
userId and mobileToken can be updated after the initial configureSDK without repeating the full configuration:
Logs
SDK pipeline logs are collected by useCerttaSdk in the logs array:
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.
Code obfuscation
Add ProGuard/R8 rules to android/app/proguard-rules.pro so the SDK keeps working after obfuscation. See the full rule set in Legacy Getting Started — ProGuard/R8 Rules.
Next steps
Face LivenessDocument DetectorAtualizado

