From 685573e136d00671717883e4f0cb41ad35ccd14f Mon Sep 17 00:00:00 2001 From: Vansh Gandhi Date: Wed, 15 May 2024 10:19:14 -0700 Subject: [PATCH] Fix invalid livenessImages JSON in SmartSelfie (#72) Fixes https://github.com/smileidentity/flutter/issues/70 --- CHANGELOG.md | 5 +++++ ios/Classes/SmileIDSmartSelfieAuthentication.swift | 2 +- ios/Classes/SmileIDSmartSelfieEnrollment.swift | 2 +- pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c468951..840c41f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Release Notes + +## 10.0.12 + +* Fixed a bug where SmartSelfieEnrollment and SmartSelfieAuthentication would return invalid `livenessImages` in `onSuccess` + ## 10.0.11 * Fixed SmileIDSmartSelfieAuthentication so that it calls the correct method on ios diff --git a/ios/Classes/SmileIDSmartSelfieAuthentication.swift b/ios/Classes/SmileIDSmartSelfieAuthentication.swift index 00f868c..c5ec547 100644 --- a/ios/Classes/SmileIDSmartSelfieAuthentication.swift +++ b/ios/Classes/SmileIDSmartSelfieAuthentication.swift @@ -59,7 +59,7 @@ class SmileIDSmartSelfieAuthentication : NSObject, FlutterPlatformView, SmartSel } _channel.invokeMethod("onSuccess", arguments: """ {"selfieFile": "\(selfieImage.absoluteString)", - "livenessImages": "\(livenessImages.map { $0.absoluteString })", + "livenessImages": \(livenessImages.map { $0.absoluteString }), "jobStatusResponse": \(jobStatusResponseJson)} """) } diff --git a/ios/Classes/SmileIDSmartSelfieEnrollment.swift b/ios/Classes/SmileIDSmartSelfieEnrollment.swift index 8e267a4..2e8e552 100644 --- a/ios/Classes/SmileIDSmartSelfieEnrollment.swift +++ b/ios/Classes/SmileIDSmartSelfieEnrollment.swift @@ -60,7 +60,7 @@ class SmileIDSmartSelfieEnrollment : NSObject, FlutterPlatformView, SmartSelfieR let jsonData = try! encoder.encode(jobStatusResponse) _channel.invokeMethod("onSuccess", arguments: """ {"selfieFile": "\(selfieImage.absoluteString)", - "livenessImages": "\(livenessImages.map{ $0.absoluteString })", + "livenessImages": \(livenessImages.map{ $0.absoluteString }), "jobStatusResponse": \(jobStatusResponseJson)} """) } diff --git a/pubspec.yaml b/pubspec.yaml index fd512cc..786610e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: smile_id description: The Official Smile ID Flutter SDK -version: 10.0.11 +version: 10.0.12 homepage: "https://usesmileid.com" environment: