smile_id 11.2.12 copy "smile_id: ^11.2.12" to clipboard
smile_id: ^11.2.12 copied to clipboard

The Official Smile ID Flutter SDK

Smile ID Flutter SDK #

Smile ID

pub package Build

Smile ID provides the best solutions for Real Time Digital KYC, Identity Verification, User Onboarding, and User Authentication across Africa.

If you haven’t already, sign up for a free Smile ID account, which comes with Sandbox access.

Please see CHANGELOG.md or Releases for the most recent version and release notes

Get it on Google Play

Download on the App Store

Getting Started #

Full documentation is available at https://docs.usesmileid.com/integration-options/mobile

0. Requirements

iOS dependency management

The SDK supports both Swift Package Manager and CocoaPods.

  • Flutter 3.44+ — Swift Package Manager is used automatically. No Podfile needed for this SDK.
  • Flutter 3.24 – 3.43 — CocoaPods is used by default. Enabling Swift Package Manager on these versions is not supported by this SDK: it depends on the FlutterFramework package that Flutter introduced in 3.44. Keep the flag at its default and the SDK integrates through CocoaPods.
  • Older Flutter — CocoaPods, as before.

Minimum iOS deployment target: 13.0 (unchanged).

Swift Package Manager fetches the native SDK from GitHub Releases at resolve time. If your network sits behind a proxy or allowlist, allow github.com and objects.githubusercontent.com, or use CocoaPods, which remains fully supported.

1. Dependency

The latest release is available on pub.dev

Add the dependency to your pubspec.yaml

dependencies:
  smile_id: <latest-version>

2. 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). You may need to create the directory if it does not already exist.

iOS

Drag the smile_config.json into your project's 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.

3. Initialization

Initialize the Smile ID SDK in main.dart by calling initialize, and await the returned Future before showing any Smile ID screens — on Android, an initialization failure completes the Future with the error instead of being silently dropped:

import 'package:smile_id/smile_id.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  try {
    await SmileID.initialize(useSandbox: false, enableCrashReporting: true);
  } catch (e) {
    // Initialization failed (e.g. missing smile_config.json). Handle the error
    // and do not show Smile ID screens until initialization succeeds.
  }
  runApp(const MyApp());
}

Getting Help #

For detailed documentation, please visit https://docs.usesmileid.com/integration-options/mobile

If you require further assistance, you can file a support ticket or contact us

Contributing #

Bug reports and Pull Requests are welcomed. Please see CONTRIBUTING.md

License #

MIT License