Getting Started
Incode Onboarding provides effortless onboarding where security matters.
Incode Onboarding is part of Incode Omnichannel Biometric Identity Platform, that is powered by Incode's world-class Face Recognition, Liveness detection and ID Validation models.
Variant Explanation
The SDK is distributed in several variants. You select a variant by pointing the ref field in your pubspec.yaml at the matching release branch (see Installation):
- Standard — The default variant. No modifier.
-vc- Use this variant if you need to stream the camera feed during Selfie and/or ID scan.-nfc- Use this variant if you need NFC scanning (reading data from a passport or ID chip).-l- Use this variant if you need to manipulate locally stored identities (used for 1:NFaceAuthMode.localFace Login). See the API Reference for details.
Environment Setup
Requirements
- Minimum recommended Flutter version: 3.16
Earlier Flutter versions require manual migration to align with modern Android build toolchain requirements (AGP 8.6+, Gradle 8.7+, compileSdk 35).
Installation
YAML
onboarding_flutter_wrapper:
git:
url: git@github.com:Incode-Technologies-Example-Repos/FlutterSampleApp.git
ref: release/[VERSION]
If you need a variant that supports streaming the camera feed during Selfie and/or ID scan, please use the following option instead:
YAML
onboarding_flutter_wrapper:
git:
url: git@github.com:Incode-Technologies-Example-Repos/FlutterSampleApp.git
ref: release/[VERSION]-vc
If you need a variant that supports NFC scanning (reading data from a passport or ID chip) please use the following option instead:
YAML
onboarding_flutter_wrapper:
git:
url: git@github.com:Incode-Technologies-Example-Repos/FlutterSampleApp.git
ref: release/[VERSION]-nfc
And if you need a variant that supports manipulation of locally stored identities please use the following option instead:
YAML
onboarding_flutter_wrapper:
git:
url: git@github.com:Incode-Technologies-Example-Repos/FlutterSampleApp.git
ref: release/[VERSION]-l
Replace [VERSION] in the ref field with the latest release branch name e.g release/4.18.0
To use a version older than the latest one, replace [VERSION] in the ref field with the specific release branch, e.g., release/4.2.0.
Updating to latest version
Run flutter pub upgrade or flutter packages upgrade, and in case iOS SDK version was updated run pod install --repo-update and pod update IncdOnboarding inside your ios folder.
SDK Modes
You can choose between two modes: SdkMode.standard and SdkMode.captureOnly. SdkMode.standard is the default, but if you would like to skip image upload and server validations for id and selfie scan you can specify captureOnly mode using method:
Dart
IncodeOnboardingSdk.setSdkMode(sdkMode: SdkMode.captureOnly);
Additional Setup Instructions
Additional setup for iOS
After installation, it's necessary to do the linking for the iOS, after running the command above.
- Change your
Podfileinsideiosfolder so it requires deployment target 13 or higher.
Diff
-platform :ios, '11.0'
+platform :ios, '13.0'
- Run
pod installwithin theiosfolder:
Shell
pod install
- Adapt
Info.plistby adding mandatory permission related entries depending on the modules you need:
- For camera modules like
IdScan,SelfieScan,DocumentScanorVideoSelfietheNSCameraUsageDescriptionis mandatory. Geolocationmodule requiresNSLocationWhenInUseUsageDescriptionVideoSelfiemodule and its voice consent step requiresNSMicrophoneUsageDescription
Additional setup for Android
- Modify
app/build.gradleso that you enablemultiDexEnabledand set the minimum API level to 23 (24 if using the video streaming dependency):
Diff
defaultConfig {
…
multiDexEnabled true
minSdkVersion 23
}
- Modify your project's
build.gradleso it contains the GitHub Packages repository with credentials provided by Incode.
Diff
allprojects {
repositories {
...
+ maven { url "https://jitpack.io" }
+ maven {
+ url = uri("https://maven.pkg.github.com/Incode-Technologies-Example-Repos/android-omni-packages")
+ credentials {
+ username = "incode-customers"
+ password = "GITHUB_TOKEN"
+ }
+ }
...
}
}
Additionally, if you're explicitly setting kotlin-gradle-plugin version make sure kotlin version is set to 1.9.0:
Diff
buildscript {
+ ext.kotlin_version = '1.9.0'
///
dependencies {
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
- Optionally, modify your
app/build.gradleto add dependencies depending on the features you want to use. Optional dependencies can be added for optimized Face Login features:- Add
com.incode.sdk:model-liveness-detection:[VERSION]to use local liveness by specifying .localFaceAuthModefor face login. - Add
com.incode.sdk:model-face-recognition:[VERSION]to use local face recognition by specifying .localFaceAuthModefor face login.
- Add
Running the example app
To run the example app, follow these steps:
- Navigate to root of the example folder. Create
.envfile. The file is added in.gitignoreso it won't be pushed to the repository. It is used to store your own credentials. Example of the.envfile content:
API_URL=YOUR_API_URL
API_KEY=YOUR_API_KEY
COMBINED_CONSENT_ID=YOUR_COMBINED_CONSENT_ID
WORKFLOW_CONFIGURATION_ID=YOUR_WORKFLOW_CONFIGURATION_ID
FLOW_CONFIGURATION_ID=YOUR_FLOW_CONFIGURATION_ID
DEEP_LINK=YOUR_DEEP_LINK
E2EE_URL=YOUR_E2EE_URL
Run
flutter pub getto install dependencies.Run the following commands to generate corresponding files for those env values:
flutter pub run build_runner clean
flutter pub run build_runner build --delete-conflicting-outputs
The mandatory values to run the app properly are
apiKeyandapiUrl. Replace the other values in home.dart based on your needs.Run the app.