Skip to content

Commit

Permalink
Remove jobId in Biometric Jobs (#120)
Browse files Browse the repository at this point in the history
* remove jobId and let partners pass inside extraPartnerParams

* code formatting

* updated smileid ios

* bump up version
  • Loading branch information
jumaallan authored Oct 22, 2024
1 parent cf5891e commit 293b715
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Notes

## 10.2.0
* Remove `jobId` in selfie jobs. This is now passed inside `extraPartnerParams`

## 10.1.10
* Added selfie capture screens
* Added document capture screens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.compose.runtime.Composable
import com.smileidentity.SmileID
import com.smileidentity.compose.SmartSelfieAuthentication
import com.smileidentity.results.SmileIDResult
import com.smileidentity.util.randomJobId
import com.smileidentity.util.randomUserId
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.StandardMessageCodec
Expand All @@ -28,7 +27,6 @@ internal class SmileIDSmartSelfieAuthentication private constructor(
val extraPartnerParams = args["extraPartnerParams"] as? Map<String, String> ?: emptyMap()
SmileID.SmartSelfieAuthentication(
userId = args["userId"] as? String ?: randomUserId(),
jobId = args["jobId"] as? String ?: randomJobId(),
allowNewEnroll = args["allowNewEnroll"] as? Boolean ?: false,
allowAgentMode = args["allowAgentMode"] as? Boolean ?: false,
showAttribution = args["showAttribution"] as? Boolean ?: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.compose.runtime.Composable
import com.smileidentity.SmileID
import com.smileidentity.compose.SmartSelfieEnrollment
import com.smileidentity.results.SmileIDResult
import com.smileidentity.util.randomJobId
import com.smileidentity.util.randomUserId
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.StandardMessageCodec
Expand All @@ -28,7 +27,6 @@ internal class SmileIDSmartSelfieEnrollment private constructor(
val extraPartnerParams = args["extraPartnerParams"] as? Map<String, String> ?: emptyMap()
SmileID.SmartSelfieEnrollment(
userId = args["userId"] as? String ?: randomUserId(),
jobId = args["jobId"] as? String ?: randomJobId(),
allowNewEnroll = args["allowNewEnroll"] as? Boolean ?: false,
allowAgentMode = args["allowAgentMode"] as? Boolean ?: false,
showAttribution = args["showAttribution"] as? Boolean ?: true,
Expand Down
14 changes: 7 additions & 7 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ PODS:
- integration_test (0.0.1):
- Flutter
- lottie-ios (4.4.3)
- smile_id (10.2.11):
- smile_id (10.2.14):
- Flutter
- SmileID (= 10.2.12)
- SmileID (10.2.12):
- SmileID (= 10.2.14)
- SmileID (10.2.14):
- FingerprintJS
- lottie-ios (~> 4.4.2)
- ZIPFoundation (~> 0.9)
Expand Down Expand Up @@ -39,11 +39,11 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FingerprintJS: 96410117a394cca04d0f1e2374944c8697f2cceb
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
integration_test: 13825b8a9334a850581300559b8839134b124670
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
lottie-ios: fcb5e73e17ba4c983140b7d21095c834b3087418
smile_id: 2fee0f6ebcc325b3acada2728f9283c1244f32bb
SmileID: 6a7309335dafa915a23a6c4e8bfa4742aa483fc8
smile_id: 3032fbe9028f83515a9f65b10f0ada419aec9860
SmileID: 5b3315414026c4b3bc7dfb0e39ab48fe21299ec3
ZIPFoundation: b8c29ea7ae353b309bc810586181fd073cb3312c

PODFILE CHECKSUM: 929954fb8941cef06249e96bd1516fd2a22ed7a5
Expand Down
1 change: 0 additions & 1 deletion ios/Classes/SmileIDSmartSelfieAuthentication.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class SmileIDSmartSelfieAuthentication : NSObject, FlutterPlatformView, SmartSel
super.init()
let screen = SmileID.smartSelfieAuthenticationScreen(
userId: args["userId"] as? String ?? "user-\(UUID().uuidString)",
jobId: args["jobId"] as? String ?? "job-\(UUID().uuidString)",
allowNewEnroll: args["allowNewEnroll"] as? Bool ?? false,
allowAgentMode: args["allowAgentMode"] as? Bool ?? false,
showAttribution: args["showAttribution"] as? Bool ?? true,
Expand Down
1 change: 0 additions & 1 deletion ios/Classes/SmileIDSmartSelfieEnrollment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class SmileIDSmartSelfieEnrollment : NSObject, FlutterPlatformView, SmartSelfieR
super.init()
let screen = SmileID.smartSelfieEnrollmentScreen(
userId: args["userId"] as? String ?? "user-\(UUID().uuidString)",
jobId: args["jobId"] as? String ?? "job-\(UUID().uuidString)",
allowNewEnroll: args["allowNewEnroll"] as? Bool ?? false,
allowAgentMode: args["allowAgentMode"] as? Bool ?? false,
showAttribution: args["showAttribution"] as? Bool ?? true,
Expand Down
4 changes: 2 additions & 2 deletions ios/smile_id.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Pod::Spec.new do |s|
s.name = 'smile_id'
# NB! Keep this version in sync with the Native iOS SDK version
s.version = '10.2.11'
s.version = '10.2.14'
s.summary = 'Official Smile ID SDK for Flutter'
s.description = <<-DESC
A new Flutter project.
Expand All @@ -15,7 +15,7 @@ A new Flutter project.
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
# NB! Update the s.version above when changing this version
s.dependency 'SmileID', '10.2.12'
s.dependency 'SmileID', '10.2.14'
s.platform = :ios, '13.0'

# Flutter.framework does not contain a i386 slice.
Expand Down
4 changes: 1 addition & 3 deletions lib/smile_id_smart_selfie_authentication.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ class SmileIDSmartSelfieAuthentication extends StatelessWidget {

factory SmileIDSmartSelfieAuthentication({
Key? key,
// userId and jobId can't actually be null in the native SDK but we delegate their creation to
// userId can't actually be null in the native SDK but we delegate their creation to
// the native platform code, since that's where the random ID creation happens
String? userId,
String? jobId,
bool allowNewEnroll = false,
bool allowAgentMode = false,
bool showAttribution = true,
Expand All @@ -38,7 +37,6 @@ class SmileIDSmartSelfieAuthentication extends StatelessWidget {
onError: onError,
creationParams: {
"userId": userId,
"jobId": jobId,
"allowNewEnroll": allowNewEnroll,
"allowAgentMode": allowAgentMode,
"showAttribution": showAttribution,
Expand Down
4 changes: 1 addition & 3 deletions lib/smile_id_smart_selfie_enrollment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ class SmileIDSmartSelfieEnrollment extends StatelessWidget {

factory SmileIDSmartSelfieEnrollment({
Key? key,
// userId and jobId can't actually be null in the native SDK but we delegate their creation to
// userId can't actually be null in the native SDK but we delegate their creation to
// the native platform code, since that's where the random ID creation happens
String? userId,
String? jobId,
bool allowNewEnroll = false,
bool allowAgentMode = false,
bool showAttribution = true,
Expand All @@ -38,7 +37,6 @@ class SmileIDSmartSelfieEnrollment extends StatelessWidget {
onError: onError,
creationParams: {
"userId": userId,
"jobId": jobId,
"allowNewEnroll": allowNewEnroll,
"allowAgentMode": allowAgentMode,
"showAttribution": showAttribution,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: smile_id
description: The Official Smile ID Flutter SDK
version: 10.1.10
version: 10.2.0
homepage: "https://usesmileid.com"

environment:
Expand Down

0 comments on commit 293b715

Please sign in to comment.