Getting Started

Installation and Initialization


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.


The latest release is available on

Add the dependency to your pubspec.yaml

  smile_id: <latest-version>

Smile Config


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


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:

android {
    buildFeatures {
        compose true
    composeOptions {
        kotlinCompilerVersion = "" // Specify the version compatible with your project's Kotlin version 


Initialize the Smile ID SDK in main.dart by calling initialize

import 'package:smile_id/smile_id.dart';

void main()  {

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

SmileID.setCallbackUrl(callbackUrl: Uri.parse(""));

Environments (Sandbox/Production)

To set the environment, use the setEnvironment method

SmileID.setEnvironment(useSandbox: true);


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