Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release Notes

## 11.2.4 - December 22, 2025

### Changed
* Bump Android SDK to [v11.1.5](https://github.com/smileidentity/android/releases/tag/v11.1.5)
* Bump iOS SDK to [v11.1.4](https://github.com/smileidentity/ios/releases/tag/v11.1.4)

### Added
* Added smile sensitivity parameter for customizable selfie capture thresholds.

## 11.2.3 - November 3, 2025

### Changed
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ android {
}

dependencies {
implementation("com.smileidentity:android-sdk:11.1.4")
implementation("com.smileidentity:android-sdk:11.1.5")
implementation("androidx.core:core-ktx:1.17.0")
implementation(platform("androidx.compose:compose-bom:2025.11.00"))
implementation("androidx.compose.ui:ui")
Expand Down
2 changes: 2 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-sdk tools:overrideLibrary="com.google.android.gms.common"/>

<application
android:pageSizeCompat="enabled"
tools:targetApi="36" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class SmileIDPlugin :
context = flutterPluginBinding.applicationContext

// Set wrapper info for Flutter SDK
SmileID.setWrapperInfo(WrapperSdkName.Flutter, "11.2.3")
SmileID.setWrapperInfo(WrapperSdkName.Flutter, "11.2.4")

flutterPluginBinding.platformViewRegistry.registerViewFactory(
SmileIDBiometricKYC.VIEW_TYPE_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.smileidentity.compose.theme.colorScheme
import com.smileidentity.compose.theme.typography
import com.smileidentity.flutter.results.DocumentCaptureResult
import com.smileidentity.flutter.utils.DocumentCaptureResultAdapter
import com.smileidentity.flutter.utils.toAutoCapture
import com.smileidentity.flutter.views.SmileComposablePlatformView
import com.smileidentity.flutter.views.SmileIDViewFactory
import com.smileidentity.metadata.LocalMetadataProvider
Expand Down Expand Up @@ -54,9 +55,7 @@ internal class SmileIDDocumentCaptureView private constructor(
Surface(
modifier = Modifier.fillMaxSize(),
) {
val autoCapture = (args["autoCapture"] as? String)?.lowercase()?.let { input ->
AutoCapture.entries.firstOrNull { it.name.lowercase() == input }
} ?: AutoCapture.AutoCapture
val autoCapture = (args["autoCapture"] as? String).toAutoCapture()
val isDocumentFrontSide = args["isDocumentFrontSide"] as? Boolean ?: true
val showInstructions = args["showInstructions"] as? Boolean ?: true
val showAttribution = args["showAttribution"] as? Boolean ?: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ import com.smileidentity.compose.selfie.SelfieCaptureScreen
import com.smileidentity.compose.selfie.SmartSelfieInstructionsScreen
import com.smileidentity.compose.theme.colorScheme
import com.smileidentity.compose.theme.typography
import com.smileidentity.flutter.utils.toSmileSensitivity
import com.smileidentity.flutter.views.SmileIDViewFactory
import com.smileidentity.flutter.views.SmileSelfieComposablePlatformView
import com.smileidentity.metadata.LocalMetadataProvider
import com.smileidentity.models.SmileSensitivity
import com.smileidentity.util.randomJobId
import com.smileidentity.util.randomUserId
import com.smileidentity.viewmodel.SelfieUiState
Expand Down Expand Up @@ -66,6 +68,7 @@ internal class SmileIDSmartSelfieCaptureView private constructor(
@OptIn(SmileIDOptIn::class)
@Composable
override fun Content(args: Map<String, Any?>) {
val smileSensitivity = (args["smileSensitivity"] as? String).toSmileSensitivity()
val showConfirmationDialog = args["showConfirmationDialog"] as? Boolean ?: true
val showInstructions = args["showInstructions"] as? Boolean ?: true
val showAttribution = args["showAttribution"] as? Boolean ?: true
Expand Down Expand Up @@ -99,6 +102,7 @@ internal class SmileIDSmartSelfieCaptureView private constructor(
allowNewEnroll = true,
skipApiSubmission = true,
metadata = mutableListOf(),
smileSensitivity = smileSensitivity,
)
},
)
Expand All @@ -125,6 +129,7 @@ internal class SmileIDSmartSelfieCaptureView private constructor(
userId,
jobId,
allowAgentMode,
smileSensitivity,
viewModel,
)
}
Expand All @@ -140,6 +145,7 @@ internal class SmileIDSmartSelfieCaptureView private constructor(
userId: String,
jobId: String,
allowAgentMode: Boolean,
smileSensitivity: SmileSensitivity,
viewModel: SelfieViewModel,
) {
Box(
Expand All @@ -156,6 +162,7 @@ internal class SmileIDSmartSelfieCaptureView private constructor(
allowNewEnroll = true,
skipApiSubmission = true,
viewModel = viewModel,
smileSensitivity = smileSensitivity,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import com.smileidentity.SmileID
import com.smileidentity.compose.DocumentVerification
import com.smileidentity.flutter.results.DocumentCaptureResult
import com.smileidentity.flutter.utils.DocumentCaptureResultAdapter
import com.smileidentity.flutter.utils.toAutoCapture
import com.smileidentity.flutter.views.SmileComposablePlatformView
import com.smileidentity.flutter.views.SmileIDViewFactory
import com.smileidentity.models.AutoCapture
import com.smileidentity.results.SmileIDResult
import com.smileidentity.util.randomJobId
import com.smileidentity.util.randomUserId
Expand Down Expand Up @@ -55,9 +55,7 @@ internal class SmileIDDocumentVerification private constructor(
jobId = args["jobId"] as? String ?: randomJobId(),
autoCaptureTimeout = (args["autoCaptureTimeout"] as? Int)?.toLong()?.milliseconds
?: 10.seconds,
autoCapture = (args["autoCapture"] as? String)?.lowercase()?.let { input ->
AutoCapture.entries.firstOrNull { it.name.lowercase() == input }
} ?: AutoCapture.AutoCapture,
autoCapture = (args["autoCapture"] as? String).toAutoCapture(),
allowNewEnroll = args["allowNewEnroll"] as? Boolean ?: false,
showAttribution = args["showAttribution"] as? Boolean ?: true,
allowAgentMode = args["allowAgentMode"] as? Boolean ?: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import com.smileidentity.compose.EnhancedDocumentVerificationScreen
import com.smileidentity.flutter.results.DocumentCaptureResult
import com.smileidentity.flutter.utils.DocumentCaptureResultAdapter
import com.smileidentity.flutter.utils.buildConsentInformation
import com.smileidentity.flutter.utils.toAutoCapture
import com.smileidentity.flutter.views.SmileComposablePlatformView
import com.smileidentity.flutter.views.SmileIDViewFactory
import com.smileidentity.models.AutoCapture
import com.smileidentity.results.SmileIDResult
import com.smileidentity.util.randomJobId
import com.smileidentity.util.randomUserId
Expand Down Expand Up @@ -58,9 +58,7 @@ internal class SmileIDEnhancedDocumentVerification private constructor(
jobId = args["jobId"] as? String ?: randomJobId(),
autoCaptureTimeout = (args["autoCaptureTimeout"] as? Int)?.toLong()?.milliseconds
?: 10.seconds,
autoCapture = (args["autoCapture"] as? String)?.lowercase()?.let { input ->
AutoCapture.entries.firstOrNull { it.name.lowercase() == input }
} ?: AutoCapture.AutoCapture,
autoCapture = (args["autoCapture"] as? String).toAutoCapture(),
allowNewEnroll = args["allowNewEnroll"] as? Boolean ?: false,
showAttribution = args["showAttribution"] as? Boolean ?: true,
allowAgentMode = args["allowAgentMode"] as? Boolean ?: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import androidx.compose.runtime.Composable
import com.smileidentity.SmileID
import com.smileidentity.compose.SmartSelfieAuthentication
import com.smileidentity.flutter.utils.toSmileSensitivity
import com.smileidentity.flutter.views.SmileIDViewFactory
import com.smileidentity.flutter.views.SmileSelfieComposablePlatformView
import com.smileidentity.util.randomUserId
Expand Down Expand Up @@ -34,13 +35,15 @@ internal class SmileIDSmartSelfieAuthentication private constructor(
@Composable
override fun Content(args: Map<String, Any?>) {
val extraPartnerParams = args["extraPartnerParams"] as? Map<String, String> ?: emptyMap()
val smileSensitivity = (args["smileSensitivity"] as? String).toSmileSensitivity()
SmileID.SmartSelfieAuthentication(
userId = args["userId"] as? String ?: randomUserId(),
allowNewEnroll = args["allowNewEnroll"] as? Boolean ?: false,
allowAgentMode = args["allowAgentMode"] as? Boolean ?: false,
showAttribution = args["showAttribution"] as? Boolean ?: true,
showInstructions = args["showInstructions"] as? Boolean ?: true,
skipApiSubmission = args["skipApiSubmission"] as? Boolean ?: false,
smileSensitivity = smileSensitivity,
extraPartnerParams = extraPartnerParams.toImmutableMap(),
onResult = { res -> handleResult(res) },
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.content.Context
import androidx.compose.runtime.Composable
import com.smileidentity.SmileID
import com.smileidentity.compose.SmartSelfieEnrollment
import com.smileidentity.flutter.utils.toSmileSensitivity
import com.smileidentity.flutter.views.SmileIDViewFactory
import com.smileidentity.flutter.views.SmileSelfieComposablePlatformView
import com.smileidentity.util.randomUserId
Expand Down Expand Up @@ -34,13 +35,15 @@ internal class SmileIDSmartSelfieEnrollment private constructor(
@Composable
override fun Content(args: Map<String, Any?>) {
val extraPartnerParams = args["extraPartnerParams"] as? Map<String, String> ?: emptyMap()
val smileSensitivity = (args["smileSensitivity"] as? String).toSmileSensitivity()
SmileID.SmartSelfieEnrollment(
userId = args["userId"] as? String ?: randomUserId(),
allowNewEnroll = args["allowNewEnroll"] as? Boolean ?: false,
allowAgentMode = args["allowAgentMode"] as? Boolean ?: false,
showAttribution = args["showAttribution"] as? Boolean ?: true,
showInstructions = args["showInstructions"] as? Boolean ?: true,
skipApiSubmission = args["skipApiSubmission"] as? Boolean ?: false,
smileSensitivity = smileSensitivity,
extraPartnerParams = extraPartnerParams.toImmutableMap(),
onResult = { res -> handleResult(res) },
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.smileidentity.flutter.utils

import com.smileidentity.models.AutoCapture
import com.smileidentity.models.ConsentInformation
import com.smileidentity.models.ConsentedInformation
import com.smileidentity.models.SmileSensitivity
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
Expand Down Expand Up @@ -50,3 +52,26 @@ fun buildConsentInformation(
} else {
null
}

/**
* Converts a string to an [AutoCapture] enum value.
* Returns [AutoCapture.AutoCapture] if the string does not match any enum value.
*
* @receiver The string to convert.
* @return The corresponding [AutoCapture] enum value or [AutoCapture.AutoCapture] if no match is found.
*/

fun String?.toAutoCapture(): AutoCapture = AutoCapture.entries.firstOrNull {
it.name.equals(this, ignoreCase = true)
} ?: AutoCapture.AutoCapture

/**
* Converts a string to a [SmileSensitivity] enum value.
* Returns [SmileSensitivity.NORMAL] if the string does not match any enum value.
*
* @receiver The string to convert.
* @return The corresponding [SmileSensitivity] enum value or [SmileSensitivity.NORMAL] if no match is found.
*/
fun String?.toSmileSensitivity(): SmileSensitivity = SmileSensitivity.entries.firstOrNull {
it.name.equals(this, ignoreCase = true)
} ?: SmileSensitivity.NORMAL
2 changes: 1 addition & 1 deletion ios/Classes/SmileIDPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class SmileIDPlugin: NSObject, FlutterPlugin, SmileIDApi {
let api: SmileIDApi & NSObjectProtocol = SmileIDPlugin()
SmileIDApiSetup.setUp(binaryMessenger: messenger, api: api)

SmileID.setWrapperInfo(name: .flutter, version: "11.2.3")
SmileID.setWrapperInfo(name: .flutter, version: "11.2.4")

let documentVerificationFactory = SmileIDDocumentVerification.Factory(
messenger: registrar.messenger()
Expand Down
1 change: 1 addition & 0 deletions ios/Classes/SmileIDSmartSelfieAuthentication.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class SmileIDSmartSelfieAuthentication : NSObject, FlutterPlatformView, SmartSel
allowAgentMode: args["allowAgentMode"] as? Bool ?? false,
showAttribution: args["showAttribution"] as? Bool ?? true,
showInstructions: args["showInstructions"] as? Bool ?? true,
smileSensitivity: SmileSensitivity.from(args["smileSensitivity"] as? String),
skipApiSubmission: args["skipApiSubmission"] as? Bool ?? false,
extraPartnerParams: args["extraPartnerParams"] as? [String: String] ?? [:],
delegate: self
Expand Down
7 changes: 6 additions & 1 deletion ios/Classes/SmileIDSmartSelfieCaptureView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SmileIDSmartSelfieCaptureView: NSObject, FlutterPlatformView {
let showAttribution = args["showAttribution"] as? Bool ?? true
let allowAgentMode = args["allowAgentMode"] as? Bool ?? true
let useStrictMode = args["useStrictMode"] as? Bool ?? false
let smileSensitivity = SmileSensitivity.from(args["smileSensitivity"] as? String)

_viewModel = SelfieViewModel(
isEnroll: false,
Expand All @@ -48,6 +49,7 @@ class SmileIDSmartSelfieCaptureView: NSObject, FlutterPlatformView {
allowAgentMode: allowAgentMode,
showAttribution: showAttribution,
useStrictMode: useStrictMode,
smileSensitivity: smileSensitivity,
channel: _channel
)
_childViewController = embedView(rootView, in: _view, frame: frame)
Expand All @@ -66,6 +68,7 @@ struct SmileIDRootView: View {
let allowAgentMode: Bool
let showAttribution: Bool
let useStrictMode: Bool
let smileSensitivity: SmileSensitivity
let channel: FlutterMethodChannel
static let shared = FileManager()
private let fileManager = Foundation.FileManager.default
Expand Down Expand Up @@ -124,7 +127,9 @@ struct SmileIDRootView: View {
}
} else {
SelfieCaptureScreen(
viewModel: viewModel, allowAgentMode: allowAgentMode
viewModel: viewModel,
allowAgentMode: allowAgentMode,
smileSensitivity: smileSensitivity,
).preferredColorScheme(.light)
}
}
Expand Down
1 change: 1 addition & 0 deletions ios/Classes/SmileIDSmartSelfieEnrollment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class SmileIDSmartSelfieEnrollment : NSObject, FlutterPlatformView, SmartSelfieR
allowAgentMode: args["allowAgentMode"] as? Bool ?? false,
showAttribution: args["showAttribution"] as? Bool ?? true,
showInstructions: args["showInstructions"] as? Bool ?? true,
smileSensitivity: SmileSensitivity.from(args["smileSensitivity"] as? String),
skipApiSubmission: args["skipApiSubmission"] as? Bool ?? false,
extraPartnerParams: args["extraPartnerParams"] as? [String: String] ?? [:],
delegate: self
Expand Down
13 changes: 13 additions & 0 deletions ios/Classes/SmileIDUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,16 @@ extension AutoCapture {
}
}
}

extension SmileSensitivity {
static func from(_ string: String?) -> SmileSensitivity {
switch string?.lowercased() {
case "normal":
return .normal
case "relaxed":
return .relaxed
default:
return .normal
}
}
}
2 changes: 1 addition & 1 deletion ios/smile_id.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'SmileID', '11.1.3'
s.dependency 'SmileID', '11.1.4'
# for development alongside sample/ios/Podfile uncomment the version and specify
# tag or branch in sample/ios/Podfile
# s.dependency "SmileID"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/widgets.dart';
import 'package:smile_id/products/models/model.dart';

import '../../views/smile_view.dart';

Expand All @@ -24,6 +25,7 @@ class SmileIDSmartSelfieCaptureView extends StatelessWidget {
bool showAttribution = true,
bool allowAgentMode = true,
bool useStrictMode = false,
SmileSensitivity smileSensitivity = SmileSensitivity.normal,
required Function(String resultJson) onSuccess,
required Function(String errorMessage) onError,
}) {
Expand All @@ -36,6 +38,7 @@ class SmileIDSmartSelfieCaptureView extends StatelessWidget {
"showAttribution": showAttribution,
"allowAgentMode": allowAgentMode,
"useStrictMode": useStrictMode,
"smileSensitivity": smileSensitivity.name,
},
);
}
Expand Down
5 changes: 5 additions & 0 deletions lib/products/models/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ enum AutoCaptureMode {
autoCaptureOnly,
manualCaptureOnly,
}

enum SmileSensitivity {
normal,
relaxed,
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/widgets.dart';

import '../../views/smile_view.dart';
import '../models/model.dart';

class SmileIDSmartSelfieAuthentication extends StatelessWidget {
static const String viewType = "SmileIDSmartSelfieAuthentication";
Expand All @@ -27,6 +28,7 @@ class SmileIDSmartSelfieAuthentication extends StatelessWidget {
bool showAttribution = true,
bool showInstructions = true,
bool skipApiSubmission = false,
SmileSensitivity smileSensitivity = SmileSensitivity.normal,
Map<String, String>? extraPartnerParams,
required Function(String resultJson) onSuccess,
required Function(String errorMessage) onError,
Expand All @@ -42,6 +44,7 @@ class SmileIDSmartSelfieAuthentication extends StatelessWidget {
"showInstructions": showInstructions,
"skipApiSubmission": skipApiSubmission,
"extraPartnerParams": extraPartnerParams,
"smileSensitivity": smileSensitivity.name,
},
);
}
Expand Down
Loading
Loading