diff --git a/CHANGELOG.md b/CHANGELOG.md index 623100f38..9ca911ef0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Biometric KYC - Consent Screen - BVN OTP API calls and models +- Added `allowAgentMode` option on Document Verification and Enhanced Document Verification ### Changed - Default to `production` on `SmileID.initialize()` diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 5995557d5..7731390cb 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,6 +1,6 @@ PODS: - netfox (1.21.0) - - SmileID (10.0.0-beta07): + - SmileID (10.0.0-beta10): - Zip (~> 2.1.0) - SwiftLint (0.52.4) - Zip (2.1.2) @@ -22,7 +22,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: netfox: 9d5cc727fe7576c4c7688a2504618a156b7d44b7 - SmileID: 75e58d498ba4dfdd2c37510fe43f82423051faa5 + SmileID: 5975f6130f357bfa08e9b1f731f9ce3e2d91c216 SwiftLint: 1cc5cd61ba9bacb2194e340aeb47a2a37fda00b3 Zip: b3fef584b147b6e582b2256a9815c897d60ddc67 diff --git a/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift b/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift index 3d53a4536..735fff394 100644 --- a/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift +++ b/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift @@ -10,6 +10,7 @@ struct OrchestratedDocumentVerificationScreen: View { let jobId: String let showAttribution: Bool let allowGalleryUpload: Bool + let allowAgentMode: Bool let showInstructions: Bool let onResult: DocumentVerificationResultDelegate @@ -24,6 +25,7 @@ struct OrchestratedDocumentVerificationScreen: View { jobId: jobId, showAttribution: showAttribution, allowGalleryUpload: allowGalleryUpload, + allowAgentMode: allowAgentMode, showInstructions: showInstructions, onResult: onResult, viewModel: OrchestratedDocumentVerificationViewModel( @@ -49,6 +51,7 @@ struct OrchestratedEnhancedDocumentVerificationScreen: View { let jobId: String let showAttribution: Bool let allowGalleryUpload: Bool + let allowAgentMode: Bool let showInstructions: Bool let onResult: EnhancedDocumentVerificationResultDelegate @@ -63,6 +66,7 @@ struct OrchestratedEnhancedDocumentVerificationScreen: View { jobId: jobId, showAttribution: showAttribution, allowGalleryUpload: allowGalleryUpload, + allowAgentMode: allowAgentMode, showInstructions: showInstructions, onResult: onResult, viewModel: OrchestratedEnhancedDocumentVerificationViewModel( @@ -88,6 +92,7 @@ private struct IOrchestratedDocumentVerificationScreen: View { let jobId: String let showAttribution: Bool let allowGalleryUpload: Bool + let allowAgentMode: Bool let showInstructions: Bool let onResult: T @ObservedObject var viewModel: IOrchestratedDocumentVerificationViewModel @@ -102,6 +107,7 @@ private struct IOrchestratedDocumentVerificationScreen: View { jobId: String, showAttribution: Bool, allowGalleryUpload: Bool, + allowAgentMode: Bool, showInstructions: Bool, onResult: T, viewModel: IOrchestratedDocumentVerificationViewModel @@ -115,6 +121,7 @@ private struct IOrchestratedDocumentVerificationScreen: View { self.jobId = jobId self.showAttribution = showAttribution self.allowGalleryUpload = allowGalleryUpload + self.allowAgentMode = allowAgentMode self.showInstructions = showInstructions self.onResult = onResult self.viewModel = viewModel @@ -163,6 +170,7 @@ private struct IOrchestratedDocumentVerificationScreen: View { userId: userId, jobId: jobId, isEnroll: false, + allowsAgentMode: allowAgentMode, shouldSubmitJob: false, // imageCaptureDelegate is just for image capture, not job result imageCaptureDelegate: viewModel diff --git a/Sources/SmileID/Classes/SmileID.swift b/Sources/SmileID/Classes/SmileID.swift index c810c4444..bd5b3ba2a 100644 --- a/Sources/SmileID/Classes/SmileID.swift +++ b/Sources/SmileID/Classes/SmileID.swift @@ -205,6 +205,7 @@ public class SmileID { idAspectRatio: Double? = nil, bypassSelfieCaptureWithFile: URL? = nil, captureBothSides: Bool = true, + allowAgentMode: Bool = false, allowGalleryUpload: Bool = false, showInstructions: Bool = true, showAttribution: Bool = true, @@ -220,6 +221,7 @@ public class SmileID { jobId: jobId, showAttribution: showAttribution, allowGalleryUpload: allowGalleryUpload, + allowAgentMode: allowAgentMode, showInstructions: showInstructions, onResult: delegate ).environmentObject(router) @@ -242,6 +244,9 @@ public class SmileID { /// - captureBothSides: Whether to capture both sides of the ID or not. Otherwise, only the /// front side will be captured. If this is true, an option to skip back side will still be /// shown + /// - allowAgentMode: Whether to allow Agent Mode or not. If allowed, a switch will be + /// displayed allowing toggling between the back camera and front camera. If not allowed, only + /// the front camera will be used. /// - allowGalleryUpload: Whether to allow the user to upload images from their gallery or not /// - showInstructions: Whether to deactivate capture screen's instructions for Document /// Verification (NB! If instructions are disabled, gallery upload won't be possible) @@ -255,6 +260,7 @@ public class SmileID { idAspectRatio: Double? = nil, bypassSelfieCaptureWithFile: URL? = nil, captureBothSides: Bool = true, + allowAgentMode: Bool = false, allowGalleryUpload: Bool = false, showInstructions: Bool = true, showAttribution: Bool = true, @@ -270,6 +276,7 @@ public class SmileID { jobId: jobId, showAttribution: showAttribution, allowGalleryUpload: allowGalleryUpload, + allowAgentMode: allowAgentMode, showInstructions: showInstructions, onResult: delegate ).environmentObject(router)