From c25bfe4bf1bdc46845a8b38be58b08fb5a8c2fb0 Mon Sep 17 00:00:00 2001 From: JumioMobileTeam Date: Fri, 6 Oct 2023 10:15:59 +0000 Subject: [PATCH] Final commit for 4.7.0 --- README.md | 33 +++++++------ demo/config.xml | 22 ++++++++- demo/package-lock.json | 14 +++--- demo/package.json | 2 +- demo/scripts/podExtension | 4 +- demo/www/css/index.css | 12 ++++- demo/www/index.html | 9 +++- demo/www/js/index.js | 51 ++++++++++++++------ package-lock.json | 2 +- package.json | 2 +- plugin.xml | 4 +- src/android/JumioMobileSDK.kt | 3 +- src/android/plugin.gradle | 5 +- src/android/res/values/jumio-styles.xml | 1 - src/ios/JumioMobileSDK.swift | 62 ++++++++++++++++--------- 15 files changed, 152 insertions(+), 74 deletions(-) diff --git a/README.md b/README.md index 012294f..d0d3c93 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Official Jumio Mobile SDK plugin for Apache Cordova -This plugin is compatible with version 4.6.1 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact [Jumio Support](#support). +This plugin is compatible with version 4.7.0 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact [Jumio Support](#support). # Table of Contents - [Compatibility](#compatibility) @@ -10,14 +10,15 @@ This plugin is compatible with version 4.6.1 of the Jumio SDK. If you have quest - [Integration](#integration) - [iOS](#ios) - [Android](#android) - [Proguard](#proguard) + - [Proguard](#proguard) - [Usage](#usage) - [Customization](#customization) - [Configuration](#configuration) - [Callbacks](#callbacks) - [FAQ](#faq) - - [iOS Localization](#ios-localization) - - [Framework not found iProov.xcframework](#framework-not-found-iproovxcframework) + - [Android Issues](#android-issues) + - [iOS Issues](#ios-issues) + - [Framework not found iProov.xcframework](#framework-not-found-iproovxcframework) - [Support](#support) ## Compatibility @@ -34,7 +35,7 @@ cordova create MyProject com.my.project "MyProject" cd MyProject cordova platform add ios cordova platform add android -cordova plugin add https://github.com/Jumio/mobile-cordova.git#v4.6.1 +cordova plugin add https://github.com/Jumio/mobile-cordova.git#v4.7.0 cd platforms/ios && pod install ``` @@ -69,7 +70,7 @@ Jumio.initialize(, ); Datacenter can either be **US**, **EU** or **SG**. -For more information about how to obtain an AUTHORIZATION_TOKEN, please refer to our [API Guide](https://github.com/Jumio/implementation-guides/blob/master/api-guide/api_guide.md). +For more information about how to obtain an AUTHORIZATION_TOKEN, please refer to our [API Guide](https://jumio.github.io/kyx/integration-guide.html). 2. As soon as the SDK is initialized, the sdk is started by the following call. @@ -85,7 +86,7 @@ The JumioSDK colors can be customized by overriding the custom theme `AppThemeCu ### iOS JumioSDK iOS appearance can be customized to your respective needs. You can customize each color based on the device's set appearance, for either Dark mode or Light mode, or you can set a single color for both appearances. Customization is optional and not required. -You can pass the following customization options at [`Jumio.start`](demo/www/js/index.js#L45): +You can pass the following customization options at [`Jumio.start`](demo/www/js/index.js#L40): | Customization key | |:------------------------------------------------| @@ -168,10 +169,10 @@ Jumio.start(successCallback, errorCallback, { ``` ## Configuration -For more information about how to set specific SDK parameters (callbackUrl, userReference, country, ...), please refer to our [API Guide](https://github.com/Jumio/implementation-guides/blob/master/api-guide/api_guide.md#request-body). +For more information about how to set specific SDK parameters (callbackUrl, userReference, country, ...), please refer to our [API Guide](https://jumio.github.io/kyx/integration-guide.html#request-body). ## Callback -To get information about callbacks, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our [page with server related information](https://github.com/Jumio/implementation-guides/blob/master/api-guide/api_guide.md#callback). +To get information about callbacks, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our [page with server related information](https://jumio.github.io/kyx/integration-guide.html#callback). ## Result Objects JumioSDK will return a JSONObject `documentData` with all extracted data in case of a successfully completed workflow and `error` in case of error. An error object always includes an error code and an error message. @@ -224,14 +225,16 @@ We recommend to download the files and add them to your project without changing ### iOS -You also need to copy those files to the "ios/Assets" folder for Cordova to recognize them. +You also need to copy those files to the `ios/Assets` folder for Cordova to recognize them. ### Android -You need to copy those files to the assets folder of your Android project (Path: "app/src/main/assets/") +You need to copy those files to the assets folder of your Android project (Path: `app/src/main/assets/`) # FAQ + +## Android Issues This is a list of common __Android build issues__ and how to resolve them: * `AAPT: error: resource android:attr/lStar not found` is resolved [in this Stackoverflow post](https://stackoverflow.com/a/70492116/1297835) * `Build-tool 32.0.0 is missing DX` (on Windows) - [in this Stackoverflow post](https://stackoverflow.com/a/68430992/1297835) @@ -240,8 +243,10 @@ This is a list of common __Android build issues__ and how to resolve them: * Device-ready not fired after X seconds --> The plugin definition in "YOURPROJECT/platforms/android/platform_www/plugins/cordova-plugin-jumio-mobilesdk/www" might be duplicated/corrupted due to the issue mentioned [in this Stackoverflow post](https://stackoverflow.com/questions/28017540/cordova-plugin-javascript-gets-corrupted-when-added-to-project/28264312#28264312). Please fix the duplicated `cordova.define()` call in these files as mentioned in the post. - -### iOS Simulator shows a white-screen, when the Jumio SDK is started + +## iOS Issues + +### iOS Simulator Shows a White Screen when Jumio SDK Starts The Jumio SDK does not support the iOS Simulator. Please run the Jumio SDK only on physical devices. ### iOS Runs on Debug, Crashes on Release Build @@ -263,7 +268,7 @@ Alternatively, it is also possible to set the key `manageAppVersionAndBuildNumbe After installing Cocoapods, please localize your iOS application using the languages provided at the following path: `ios -> Pods -> Jumio -> Localizations -> xx.lproj` -## Framework not found iProov.xcframework +### Framework not found iProov.xcframework If iOS application build is failing with `ld: framework not found iProov.xcframework` or `dyld: Symbol not found: ... Referenced from: /.../Frameworks/iProov.frameworks/iProov`, please make sure the necessary post install-hook has been included in your `Podfile`: ``` post_install do |installer| diff --git a/demo/config.xml b/demo/config.xml index e41c8a9..b52ebdc 100755 --- a/demo/config.xml +++ b/demo/config.xml @@ -1,5 +1,5 @@ - + DemoApp A sample Apache Cordova application that responds to the deviceready event. @@ -48,6 +48,26 @@ + + This will allow ${PRODUCT_NAME} to scan NFC-capable documents. + + + + A0000002471001 + + + + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + com.jumio.cordova + + + + diff --git a/demo/package-lock.json b/demo/package-lock.json index 8de4141..dd0d58c 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -1,16 +1,16 @@ { "name": "com.jumio.cordova.demo", - "version": "4.6.1", + "version": "4.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "com.jumio.cordova.demo", - "version": "4.6.1", + "version": "4.7.0", "license": "Apache-2.0", "dependencies": { "cordova": "^12.0.0", - "cordova-ios": "^7.0.0" + "cordova-ios": "^7.0.1" }, "devDependencies": { "cordova-android": "^12.0.1", @@ -19,7 +19,7 @@ }, "..": { "name": "cordova-plugin-jumio-mobilesdk", - "version": "4.6.1", + "version": "4.7.0", "dev": true }, "node_modules/@isaacs/cliui": { @@ -5088,9 +5088,9 @@ } }, "node_modules/systeminformation": { - "version": "5.21.4", - "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.21.4.tgz", - "integrity": "sha512-fLW6j47UoAJDlZPEqykkWTKxubxb8IFuow6pMQlqf4irZ2lBgCrCReavMkH2t8VxxjOcg6wBlZ2EPQcluAT6xg==", + "version": "5.21.9", + "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.21.9.tgz", + "integrity": "sha512-7pI4mu9P/2MGDV0T49B52E7IULBGj+kRVk6JSYUj5qfAk7N7C7aNX15fXziqrbgZntc6/jjYzWeb/x41jhg/eA==", "os": [ "darwin", "linux", diff --git a/demo/package.json b/demo/package.json index 555d2d3..e785667 100755 --- a/demo/package.json +++ b/demo/package.json @@ -1,7 +1,7 @@ { "name": "com.jumio.cordova.demo", "displayName": "DemoApp", - "version": "4.6.1", + "version": "4.7.0", "description": "A sample Apache Cordova application that responds to the deviceready event.", "main": "index.js", "scripts": { diff --git a/demo/scripts/podExtension b/demo/scripts/podExtension index e6a8c87..7fafb80 100644 --- a/demo/scripts/podExtension +++ b/demo/scripts/podExtension @@ -1,5 +1,5 @@ -dynamic_frameworks = ['Starscream', 'iProov', 'DatadogSDK', 'SwiftProtobuf'] +dynamic_frameworks = ['Starscream', 'iProov', 'DatadogCore', 'DatadogInternal', 'DatadogRUM'] # make all the other frameworks into static frameworks by overriding the static_framework? function to return true pre_install do |installer| @@ -51,7 +51,7 @@ post_install do |installer| installer.generated_projects.each do |project| project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' end end end diff --git a/demo/www/css/index.css b/demo/www/css/index.css index 70e4809..731f0a3 100755 --- a/demo/www/css/index.css +++ b/demo/www/css/index.css @@ -114,6 +114,16 @@ h1 { -webkit-animation:fade 3000ms infinite; } +textInput { + margin-top: 10px; + padding: 5px; + font-size: 16pt; +} + button { - margin-top: 10px; + margin-top: 10px; + text-align: center; + padding: 5px; + font-size: 14px; + width: 30%; } diff --git a/demo/www/index.html b/demo/www/index.html index eebe84c..5a350c9 100755 --- a/demo/www/index.html +++ b/demo/www/index.html @@ -38,8 +38,13 @@

Jumio Mobile SDK

- - + +
+ + + +
+

diff --git a/demo/www/js/index.js b/demo/www/js/index.js index ee7b132..f1d9278 100755 --- a/demo/www/js/index.js +++ b/demo/www/js/index.js @@ -17,13 +17,16 @@ * under the License. */ -const DATACENTER = 'DATACENTER'; +var DATACENTER = 'DATACENTER'; var app = { // Application Constructor initialize: function() { document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); - document.getElementById("start").addEventListener("click", this.start); + document.getElementById('start').addEventListener('click', this.start); + document.getElementById('buttonUS').addEventListener('click', this.handleButtonUS); + document.getElementById('buttonEU').addEventListener('click', this.handleButtonEU); + document.getElementById('buttonSG').addEventListener('click', this.handleButtonSG); }, // deviceready Event Handler @@ -31,13 +34,13 @@ var app = { // Bind any cordova events here. Common events are: // 'pause', 'resume', etc. onDeviceReady: function() { - + }, start: function() { var authorizationToken = ''; - if(document.getElementById("tokenInput") && document.getElementById("tokenInput").value) { - authorizationToken = document.getElementById("tokenInput").value; + if(document.getElementById('tokenInput') && document.getElementById('tokenInput').value) { + authorizationToken = document.getElementById('tokenInput').value; } Jumio.initialize(authorizationToken, DATACENTER); @@ -47,16 +50,36 @@ var app = { }, function(error) { alert(JSON.stringify(error)); }, -// { -// loadingCircleIcon: "#000000", -// loadingCirclePlain: "#000000", -// loadingCircleGradientStart: "#000000", -// loadingCircleGradientEnd: "#000000", -// loadingErrorCircleGradientStart: "#000000", -// loadingErrorCircleGradientEnd: "#000000", -// primaryButtonBackground: {"light": "#FFC0CB", "dark": "#FF1493"} -// } + { +// background: "#AC3D9A", +// primaryColor: "#FF5722", +// loadingCircleIcon: "#F2F233", +// loadingCirclePlain: "#57ffc7", +// loadingCircleGradientStart: "#EC407A", +// loadingCircleGradientEnd: "#bc2e41", +// loadingErrorCircleGradientStart: "#AC3D9A", +// loadingErrorCircleGradientEnd: "#C31322", +// primaryButtonBackground: {"light": "#D900ff00", "dark": "#9Edd9E"} + } ); + }, + handleButtonUS: function() { + DATACENTER = 'US'; + document.getElementById('buttonUS').style.backgroundColor = "#FFC055"; + document.getElementById('buttonEU').style.backgroundColor = "#B4B7BB"; + document.getElementById('buttonSG').style.backgroundColor = "#B4B7BB"; + }, + handleButtonEU: function() { + DATACENTER = 'EU'; + document.getElementById('buttonEU').style.backgroundColor = "#FFC055"; + document.getElementById('buttonUS').style.backgroundColor = "#B4B7BB"; + document.getElementById('buttonSG').style.backgroundColor = "#B4B7BB"; + }, + handleButtonSG: function() { + DATACENTER = 'SG'; + document.getElementById('buttonSG').style.backgroundColor = "#FFC055"; + document.getElementById('buttonUS').style.backgroundColor = "#B4B7BB"; + document.getElementById('buttonEU').style.backgroundColor = "#B4B7BB"; } }; diff --git a/package-lock.json b/package-lock.json index d201d63..d031670 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "cordova-plugin-jumio-mobilesdk", - "version": "4.6.1", + "version": "4.7.0", "lockfileVersion": 1 } diff --git a/package.json b/package.json index 7dce22b..8a16528 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-jumio-mobilesdk", - "version": "4.6.1", + "version": "4.7.0", "description": "Jumio Mobile SDK Plugin for Cordova", "cordova": { "id": "cordova-plugin-jumio-mobilesdk", diff --git a/plugin.xml b/plugin.xml index 1a1fef8..1d986f7 100755 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - JumioMobileSDK @@ -43,7 +43,7 @@ - + diff --git a/src/android/JumioMobileSDK.kt b/src/android/JumioMobileSDK.kt index ae8b107..2650952 100644 --- a/src/android/JumioMobileSDK.kt +++ b/src/android/JumioMobileSDK.kt @@ -4,7 +4,6 @@ import android.content.Intent import android.content.pm.PackageManager.PERMISSION_GRANTED import android.os.Build import android.util.Log -import com.jumio.cordova.demo.R import com.jumio.defaultui.JumioActivity import com.jumio.sdk.JumioSDK import com.jumio.sdk.credentials.JumioCredentialCategory.FACE @@ -107,7 +106,7 @@ class JumioMobileSDK : CordovaPlugin() { putExtra(JumioActivity.EXTRA_DATACENTER, dataCenter) //The following intent extra can be used to customize the Theme of Default UI - putExtra(JumioActivity.EXTRA_CUSTOM_THEME, R.style.AppThemeCustomJumio) + putExtra(JumioActivity.EXTRA_CUSTOM_THEME, cordova.activity.applicationContext.getResources().getIdentifier("AppThemeCustomJumio", "style", cordova.activity.applicationContext.getPackageName())) } cordova.activity.startActivityForResult(intent, REQUEST_CODE) diff --git a/src/android/plugin.gradle b/src/android/plugin.gradle index a977fc4..3c14202 100644 --- a/src/android/plugin.gradle +++ b/src/android/plugin.gradle @@ -18,18 +18,15 @@ repositories { } ext { - SDK_VERSION = "4.6.0" + SDK_VERSION = "4.7.0" kotlin_version = "1.8.0" } dependencies { // Jumio dependencies implementation "com.jumio.android:core:${SDK_VERSION}" - implementation "com.jumio.android:linefinder:${SDK_VERSION}" implementation "com.jumio.android:docfinder:${SDK_VERSION}" - implementation "com.jumio.android:mrz:${SDK_VERSION}" implementation "com.jumio.android:nfc:${SDK_VERSION}" - implementation "com.jumio.android:barcode:${SDK_VERSION}" implementation "com.jumio.android:barcode-mlkit:${SDK_VERSION}" implementation "com.jumio.android:iproov:${SDK_VERSION}" implementation "com.jumio.android:defaultui:${SDK_VERSION}" diff --git a/src/android/res/values/jumio-styles.xml b/src/android/res/values/jumio-styles.xml index 54f6684..658d445 100644 --- a/src/android/res/values/jumio-styles.xml +++ b/src/android/res/values/jumio-styles.xml @@ -57,7 +57,6 @@ - diff --git a/src/ios/JumioMobileSDK.swift b/src/ios/JumioMobileSDK.swift index 20db600..292a6a6 100644 --- a/src/ios/JumioMobileSDK.swift +++ b/src/ios/JumioMobileSDK.swift @@ -183,19 +183,21 @@ extension JumioMobileSDK: Jumio.DefaultUIDelegate { extension JumioMobileSDK { func customizeSDKColors(customizations: [String: Any?]) -> Jumio.Theme { var customTheme = Jumio.Theme() - // IProov - if let iProovAnimationForeground = customizations["iProovAnimationForeground"] as? [String: String?], let light = iProovAnimationForeground["light"] as? String, let dark = iProovAnimationForeground["dark"] as? String { - customTheme.iProov.animationForeground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) - } else if let iProovAnimationForeground = customizations["iProovAnimationForeground"] as? String { - customTheme.iProov.animationForeground = Jumio.Theme.Value(UIColor(hexString: iProovAnimationForeground)) + + // ScanHelp + if let faceAnimationForeground = customizations["faceAnimationForeground"] as? [String: String?], let light = faceAnimationForeground["light"] as? String, let dark = faceAnimationForeground["dark"] as? String { + customTheme.scanHelp.faceAnimationForeground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let faceAnimationForeground = customizations["faceAnimationForeground"] as? String { + customTheme.scanHelp.faceAnimationForeground = Jumio.Theme.Value(UIColor(hexString: faceAnimationForeground)) } - if let iProovAnimationBackground = customizations["iProovAnimationBackground"] as? [String: String?], let light = iProovAnimationBackground["light"] as? String, let dark = iProovAnimationBackground["dark"] as? String { - customTheme.iProov.animationBackground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) - } else if let iProovAnimationBackground = customizations["iProovAnimationBackground"] as? String { - customTheme.iProov.animationBackground = Jumio.Theme.Value(UIColor(hexString: iProovAnimationBackground)) + if let faceAnimationBackground = customizations["faceAnimationBackground"] as? [String: String?], let light = faceAnimationBackground["light"] as? String, let dark = faceAnimationBackground["dark"] as? String { + customTheme.scanHelp.faceAnimationBackground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let faceAnimationBackground = customizations["faceAnimationBackground"] as? String { + customTheme.scanHelp.faceAnimationBackground = Jumio.Theme.Value(UIColor(hexString: faceAnimationBackground)) } + // IProov if let iProovFilterForegroundColor = customizations["iProovFilterForegroundColor"] as? [String: String?], let light = iProovFilterForegroundColor["light"] as? String, let dark = iProovFilterForegroundColor["dark"] as? String { customTheme.iProov.filterForegroundColor = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) } else if let iProovFilterForegroundColor = customizations["iProovFilterForegroundColor"] as? String { @@ -281,10 +283,22 @@ extension JumioMobileSDK { customTheme.primaryButton.backgroundDisabled = Jumio.Theme.Value(UIColor(hexString: primaryButtonBackgroundDisabled)) } - if let primaryButtonText = customizations["primaryButtonText"] as? [String: String?], let light = primaryButtonText["light"] as? String, let dark = primaryButtonText["dark"] as? String { - customTheme.primaryButton.text = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) - } else if let primaryButtonText = customizations["primaryButtonText"] as? String { - customTheme.primaryButton.text = Jumio.Theme.Value(UIColor(hexString: primaryButtonText)) + if let primaryButtonForeground = customizations["primaryButtonForeground"] as? [String: String?], let light = primaryButtonForeground["light"] as? String, let dark = primaryButtonForeground["dark"] as? String { + customTheme.primaryButton.foreground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let primaryButtonForeground = customizations["primaryButtonForeground"] as? String { + customTheme.primaryButton.foreground = Jumio.Theme.Value(UIColor(hexString: primaryButtonForeground)) + } + + if let primaryButtonForegroundPressed = customizations["primaryButtonForegroundPressed"] as? [String: String?], let light = primaryButtonForegroundPressed["light"] as? String, let dark = primaryButtonForegroundPressed["dark"] as? String { + customTheme.primaryButton.foregroundPressed = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let primaryButtonForegroundPressed = customizations["primaryButtonForegroundPressed"] as? String { + customTheme.primaryButton.foregroundPressed = Jumio.Theme.Value(UIColor(hexString: primaryButtonForegroundPressed)) + } + + if let primaryButtonForegroundDisabled = customizations["primaryButtonForegroundDisabled"] as? [String: String?], let light = primaryButtonForegroundDisabled["light"] as? String, let dark = primaryButtonForegroundDisabled["dark"] as? String { + customTheme.primaryButton.foregroundDisabled = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let primaryButtonForegroundDisabled = customizations["primaryButtonForegroundDisabled"] as? String { + customTheme.primaryButton.foregroundDisabled = Jumio.Theme.Value(UIColor(hexString: primaryButtonForegroundDisabled)) } if let secondaryButtonBackground = customizations["secondaryButtonBackground"] as? [String: String?], let light = secondaryButtonBackground["light"] as? String, let dark = secondaryButtonBackground["dark"] as? String { @@ -305,10 +319,10 @@ extension JumioMobileSDK { customTheme.secondaryButton.backgroundDisabled = Jumio.Theme.Value(UIColor(hexString: secondaryButtonBackgroundDisabled)) } - if let secondaryButtonText = customizations["secondaryButtonText"] as? [String: String?], let light = secondaryButtonText["light"] as? String, let dark = secondaryButtonText["dark"] as? String { - customTheme.secondaryButton.text = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) - } else if let secondaryButtonText = customizations["secondaryButtonText"] as? String { - customTheme.secondaryButton.text = Jumio.Theme.Value(UIColor(hexString: secondaryButtonText)) + if let secondaryButtonForeground = customizations["secondaryButtonForeground"] as? [String: String?], let light = secondaryButtonForeground["light"] as? String, let dark = secondaryButtonForeground["dark"] as? String { + customTheme.secondaryButton.foreground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let secondaryButtonForeground = customizations["secondaryButtonForeground"] as? String { + customTheme.secondaryButton.foreground = Jumio.Theme.Value(UIColor(hexString: secondaryButtonForeground)) } // Bubble, Circle and Selection Icon @@ -460,10 +474,16 @@ extension JumioMobileSDK { customTheme.scanView.foreground = Jumio.Theme.Value(UIColor(hexString: scanViewForeground)) } - if let scanViewAnimationShutter = customizations["scanViewAnimationShutter"] as? [String: String?], let light = scanViewAnimationShutter["light"] as? String, let dark = scanViewAnimationShutter["dark"] as? String { - customTheme.scanView.shutter = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) - } else if let scanViewAnimationShutter = customizations["scanViewAnimationShutter"] as? String { - customTheme.scanView.shutter = Jumio.Theme.Value(UIColor(hexString: scanViewAnimationShutter)) + if let scanViewDocumentShutter = customizations["scanViewDocumentShutter"] as? [String: String?], let light = scanViewDocumentShutter["light"] as? String, let dark = scanViewDocumentShutter["dark"] as? String { + customTheme.scanView.documentShutter = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let scanViewDocumentShutter = customizations["scanViewDocumentShutter"] as? String { + customTheme.scanView.documentShutter = Jumio.Theme.Value(UIColor(hexString: scanViewDocumentShutter)) + } + + if let scanViewFaceShutter = customizations["scanViewFaceShutter"] as? [String: String?], let light = scanViewFaceShutter["light"] as? String, let dark = scanViewFaceShutter["dark"] as? String { + customTheme.scanView.faceShutter = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark)) + } else if let scanViewFaceShutter = customizations["scanViewFaceShutter"] as? String { + customTheme.scanView.faceShutter = Jumio.Theme.Value(UIColor(hexString: scanViewFaceShutter)) } // Search Bubble