WYA Verify SDK for Flutter
Identity verification SDK for Flutter with document scanning, liveness detection, and face matching.
Features
- Document Scanning: Capture and validate ID documents
- Liveness Detection: Verify user presence with anti-spoofing technology
- Face Matching: Compare live face capture against document photo
- Face Enrollment: Register face biometrics for future verification
Platform Support
| Platform | Minimum Version |
|---|---|
| iOS | 14.0+ (Apple App Attest requires it) |
| Android | API 23+ (Android 6.0) |
Android requirements (from plugin 2.0.0 onwards, which bundles WYA Android SDK 4.1.1):
- Android Gradle Plugin 8.1+ in your app
- Java/JDK 17
- Gradle 8.x
If your Flutter app still targets
minSdkVersion 21or uses AGP 7.x, you'll need to upgrade before consuming this version. See the migration notes section below.
iOS requirements (from plugin 2.0.0 onwards, which bundles WYA iOS SDK 2.0.0):
- Xcode 15.0+ (Swift 5.9+); plugin tested with Xcode 16.x
- iOS deployment target 14.0+ in your app's Podfile
- App Attest capability enabled on the Apple Developer portal for the consuming app's bundle ID (the SDK uses Apple App Attest for device integrity)
SDK Versions
| Platform | Version |
|---|---|
| iOS | 2.0.1 |
| Android | 4.1.1 |
Installation
Add to your pubspec.yaml:
dependencies:
flutter_wya_verify_sdk: ^2.0.1
Usage
Import the SDK
import 'package:flutter_wya_verify_sdk/flutter_wya_verify_sdk.dart';
Identity Verification (Onboarding)
try {
final result = await FlutterWyaVerifySdk.startOnboarding(
OnboardingParams(
publicKey: 'your-public-key',
idType: 'ID', // ARG_3
environment: WyaEnvironment.prod,
),
);
if (result.verified) {
print('Identity verified successfully!');
print('Data: ${result.raw}');
} else {
print('Verification failed');
}
} on WyaError catch (e) {
print('Error: ${e.message} (${e.code})');
}
Face Matching
try {
final result = await FlutterWyaVerifySdk.startFaceMatch(
FaceMatchParams(
publicKey: 'your-public-key',
operationId: 'operation-id-from-backend',
nonce: 'unique-nonce',
environment: WyaEnvironment.prod,
),
);
if (result.verified) {
print('Face match successful!');
}
} on WyaError catch (e) {
print('Error: ${e.message}');
}
Face Enrollment
try {
final result = await FlutterWyaVerifySdk.startFaceEnroll(
FaceEnrollParams(
publicKey: 'your-public-key',
operationId: 'operation-id',
nonce: 'unique-nonce',
environment: WyaEnvironment.prod,
),
);
if (result.enrolled) {
print('Face enrolled successfully!');
}
} on WyaError catch (e) {
print('Error: ${e.message}');
}
Error Handling
The SDK throws WyaError for all error conditions:
try {
// SDK operation
} on WyaError catch (e) {
switch (e.code) {
case WyaErrorCode.invalidParams:
print('Invalid parameters provided');
break;
case WyaErrorCode.cancelled:
print('User cancelled the operation');
break;
case WyaErrorCode.nativeFailure:
print('Native SDK error: ${e.message}');
break;
case WyaErrorCode.unsupportedPlatform:
print('Platform not supported');
break;
}
}
Migration notes
From 1.1.0 → 2.0.0
Bundles Android SDK 4.1.1 + iOS SDK 2.0.0. Both are major-version bumps with breaking deployment-target changes; consumer apps may need updates before adopting.
Android (consumer app must be on AGP 8.x + JDK 17 + Gradle 8.x):
android/build.gradle:compileSdkVersion 36,targetSdkVersion 36(Google Play 2026 requirement).android/app/build.gradle:minSdkVersion 23(was 21+).android/gradle/wrapper/gradle-wrapper.properties: Gradle 8.x.- Project-level
build.gradle:classpath 'com.android.tools.build:gradle:8.1.4'or newer. gradle.properties:org.gradle.java.homeset to a JDK 17 install (or install JDK 17 system-wide).
iOS (consumer app must be on Xcode 15+ and iOS 14 deployment):
ios/Podfile:platform :ios, '14.0'(was 13.0).- Enable App Attest capability on the Apple Developer portal for the
consuming app's bundle ID — the SDK uses Apple App Attest for device
integrity. Add
com.apple.developer.devicecheck.appattest-environmentto the app's entitlements (developmentfor Debug,productionfor TestFlight / App Store). - The SDK is consumed via CDN (
s.prepare_commanddownloads the XCFramework onpod install). No manual vendoring needed. - No more Lottie dependency — the iOS SDK 2.0.0 replaced Lottie with
CoreAnimation + SwiftUI. If your Podfile pinned
lottie-iosonly for this SDK, you can drop the pin. - Debugger note:
PT_DENY_ATTACHis active in Release builds — you can't attachlldb/ Xcode to a Release build of your app. Debug builds are unaffected.
API-level: the Dart-facing API (startOnboarding, startFaceEnroll,
startFaceMatch, WyaError, etc.) is unchanged. No code changes needed
in your Dart codebase.
Support
- Documentation: docs.wyasolutions.com
- Email: support@wyasolutions.com
License
Apache 2.0. See LICENSE for details.
Libraries
- flutter_wya_verify_sdk
- WYA Verify SDK for Flutter