Skip to main content

Overview

The Dataspike Mobile SDK enables you to embed a full identity verification flow directly into your mobile application. It is built on an embedded Flutter module and supports native iOS, Android, and Flutter integrations.

iOS

Native Swift integration via CocoaPods

Android

Native Kotlin integration via Gradle

Flutter

Direct Dart package integration

Prerequisites

Before integrating the SDK, complete these steps:
1

Install Flutter

Install Flutter on your development machine using the official documentation.For Android, you can alternatively follow the AAR-based setup.
2

Get your API token

Create an account and obtain your API token from the Dataspike Dashboard.
3

Create a verification

Use the Create Verification endpoint to generate a verification_url_id (also referred to as shortId).

iOS Integration

1. Add the Flutter module

From your iOS project root, add the SDK as a Git submodule:

2. Configure CocoaPods

Update your Podfile following the example Podfile or the Flutter Podfile guide. The following permission flags are required in your Podfile build settings:
Then install dependencies:
We recommend creating a separate iOS target dedicated to verification with its own scheme and Pod configuration. This prevents simulator build failures and keeps your main app target stable. See Target Configuration for details.

3. Configure Xcode

Disable User Script Sandboxing: Open Xcode → Target → Build Settings and set User Script Sandboxing to NO. Add required permissions to your Info.plist: For NSBonjourServices, add the values _dartVmService._tcp and _googlecast._tcp.

4. Start the verification flow

For a complete implementation, see the example ViewController or the Flutter engine guide.

5. Update the submodule

To update the SDK to a specific version:

Android Integration

1. Add the Flutter module

From your Android project root:

2. Configure settings.gradle

Update your settings.gradle.kts to include the Flutter module:
See the example settings.gradle or the Flutter guide.

3. Update build.gradle

Follow the example build.gradle or the Flutter guide.

4. Add permissions

Add these permissions to your AndroidManifest.xml:

5. Start the verification flow

For a complete implementation, see the example Activity or the Flutter guides for Flutter Screen and Flutter Fragment.
Flutter supports AOT builds only for armeabi-v7a, arm64-v8a, and x86_64. If your app supports additional ABIs (e.g. mips, x86), you may encounter integration issues. See the Flutter ABI documentation.

Flutter Integration

Example projects: In-repo example · Standalone example

1. Add the dependency

Add the SDK to your pubspec.yaml:

2. Configure platform permissions

Add to your Info.plist:
  • NSCameraUsageDescription
  • NSPhotoLibraryUsageDescription
  • NSMotionUsageDescription
  • NSLocalNetworkUsageDescription (Debug only)
Add to your Podfile build settings (example):

3. Start the verification flow

On Apple Silicon machines, Flutter-based integration may require running Xcode under Rosetta for proper testing and dependency compatibility.

Verification Statuses

The onVerificationCompleted callback returns one of the following statuses:

Known Limitations

Verification is fully supported only on real devices. iOS simulators may not work correctly. Simulator support improvements are planned for future releases.
In Debug configuration, image loading during verification may be significantly slower. Always test the verification flow using the Release build configuration for accurate performance.
To prevent simulator build failures, create a separate iOS target for verification:
This keeps device-only dependencies isolated from your main app target and CI pipelines.
Flutter supports AOT builds only for armeabi-v7a, arm64-v8a, and x86_64. Remove unsupported ABIs like mips or x86 from your project configuration.

Troubleshooting

If Flutter debugging doesn’t work correctly, set up the LLDB init file following the official guide.You may also need to set the iOS platform version in the Flutter module podspec:
Flutter tools require local network access for the Dart VM Service. Ensure the required permissions are added to your Info.plist and allowed in iOS system settings. See the official documentation.
On Apple Silicon Macs, you may encounter simulator architecture issues. Follow the official guide to exclude arm64 for iOS simulators or adjust CocoaPods build settings.