Getting Started
Installation and Initialization
Requirements
Flutter 3.0.0+
Dart 3.0.5+
Android 5.0+ (API level 21+)
iOS 13.0+
A
smile_config.json
file from https://portal.usesmileid.com/sdk
Getting Started
This SDK is a wrapper around the native Android and iOS SDKs. Please refer to the Android and iOS documentation for more information.
Dependency
The latest release is available on pub.dev
Add the dependency to your pubspec.yaml
Smile Config
Android
Place the smile_config.json
file under your application's assets, located at src/main/assets
(This should be at the same level as your java
and res
directories)
⚠️ Note: You may need to create this directory if it does not already exist
iOS
Drag the smile_config.json
file[^1] into your projects file inspector and ensure that the file is added to your app's target. Confirm that it is by checking the Copy Bundle Resources drop down in the Build Phases tab as shown below.
Android Specific setup
If you run into build issues related to Jetpack Compose, you may need to also update your application build.gradle
file to enable Compose and specify the Compose Compiler version. See here for additional details: https://developer.android.com/jetpack/androidx/releases/compose-kotlin
Initialization
Initialize the Smile ID SDK in main.dart
by calling initialize
On Android, your Activity must inherit from FlutterFragmentActivity
instead of FlutterActivity
Callback URL
To set the callback URL used for jobs (to deliver results to your own server), use the setCallbackUrl method
Environments (Sandbox/Production)
To set the environment, use the setEnvironment method
Networking
You can make network requests to the Smile ID backend using the SmileIDService
class, accessible by calling SmileID.api
Submitting to the App Store (iOS Only)
The Smile ID SDK for iOS uses the TrueDepth API. As a result, you must declare this API usage to Apple when submitting your iOS app for review to the App Store. Here is the relevant information you may be asked to provide:
What information is your app collecting
We use ARKit to capture face 3D spatial orientation and facial expressions.
For what purposes are you collecting this information
We use this data to ensure the selfie being taken is of a live user for authentication and fraud reduction purposes.
Will the data be shared with any third parties
The ARKit information is processed entirely locally and the spatial orientation/facial expression data is not submitted to any third (or first) parties
Last updated