Skip to content

Commit

Permalink
Final commit for 4.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Jul 5, 2024
1 parent d85568c commit 32e175b
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 79 deletions.
40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Official Jumio Mobile SDK plugin for Apache Cordova

This plugin is compatible with version 4.9.0 of the Jumio SDK.
This plugin is compatible with version 4.10.0 of the Jumio SDK.
If you have questions, please reach out to your Account Manager or contact [Jumio Support](#support).

# Table of Contents
Expand All @@ -19,15 +19,16 @@ If you have questions, please reach out to your Account Manager or contact [Jumi
- [FAQ](#faq)
- [Android Issues](#android-issues)
- [iOS Issues](#ios-issues)
- [Framework not found](#framework-not-found)
- [Framework not found iProov.xcframework](#framework-not-found-iproovxcframework)
- [Framework not found DatadogCore.xcframework](#framework-not-found-datadogcorexcframework)
- [Support](#support)

## Compatibility
With this release, we only ensure compatibility with the latest Cordova versions and plugins.
At the time of this release, the following minimum versions are supported:
* Cordova: 12.0.0
* Cordova Android: 12.0.1
* Cordova iOS: 7.0.1
* Cordova Android: 13.0.0
* Cordova iOS: 7.1.0

## Setup
Create Cordova project and add our plugin
Expand All @@ -36,7 +37,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.9.0
cordova plugin add https://github.com/Jumio/mobile-cordova.git#v4.10.0
cd platforms/ios && pod install
```

Expand Down Expand Up @@ -132,31 +133,27 @@ You can pass the following customization options at [`Jumio.start`](demo/www/js/
| bubbleBackground |
| bubbleForeground |
| bubbleBackgroundSelected |
| bubbleCircleItemForeground |
| bubbleCircleItemBackground |
| bubbleOutline |
| loadingCirclePlain |
| loadingCircleGradientStart |
| loadingCircleGradientEnd |
| loadingErrorCircleGradientStart |
| loadingErrorCircleGradientEnd |
| loadingCircleIcon |
| scanOverlay |
| scanOverlayFill |
| scanOverlayTransparent |
| scanOverlayBackground |
| nfcPassportCover |
| nfcPassportPageDark |
| nfcPassportPageLight |
| nfcPassportForeground |
| nfcPhoneCover |
| scanViewBubbleForeground |
| scanViewBubbleBackground |
| scanViewTooltipForeground |
| scanViewTooltipBackground |
| scanViewForeground |
| scanViewDocumentShutter |
| scanViewFaceShutter |
| searchBubbleBackground |
| searchBubbleForeground |
| searchBubbleBackgroundSelected |
| searchBubbleOutline |
| confirmationImageBackground |
| confirmationImageBackgroundBorder |
Expand Down Expand Up @@ -290,14 +287,27 @@ 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
### 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|
installer.pods_project.targets.each do |target|
if ['iProov', 'Starscream', 'DatadogSDK', 'SwiftProtobuf'].include? target.name
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end
```

### Framework not found DatadogCore.xcframework
If iOS application build is failing with `ld: framework not found DatadogCore.xcframework` or `dyld: Symbol not found: ... Referenced from: /.../Frameworks/DatadogCore.frameworks/DatadogCore`, please make sure the necessary post install-hook has been included in your `Podfile`:
```
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['iProov', 'DatadogRUM', 'DatadogCore', 'DatadogInternal'].include? target.name
if ['DatadogRUM', 'DatadogCore', 'DatadogInternal'].include? target.name
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
Expand Down
9 changes: 5 additions & 4 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Demonstrates how to use the JumioMobileSDK plugin.
## Prerequisites

* Cordova CLI 12.0.0
* NodeJS 21.6.2
* NodeJS 22.3.0

## Hooks

Expand All @@ -22,11 +22,12 @@ cordova plugin add --link ../
cordova platform add android && cordova prepare android
cordova platform add ios && cordova prepare ios && cd platforms/ios && pod install
```
**_DISCLAIMER:_** The 'add platform' and 'prepare' commands need to be called separately due to cordova limitations.
**_DISCLAIMER:_** The 'add platform' and 'prepare' commands need to be called separately due to Cordova limitations.

## Run the application
```
cordova run android
# OR
cordova run ios
```
cordova run ios --noprepare
```
**_DISCLAIMER:_** For devices with iOS 17+ the application can only be run from XCode due to Cordova limitations.
9 changes: 5 additions & 4 deletions demo/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.jumio.cordova.demo" version="4.9.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.jumio.cordova.demo" version="4.10.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>DemoApp</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
Expand Down Expand Up @@ -48,6 +48,7 @@
<allow-intent href="itms-apps:*" />
<preference name="deployment-target" value="12.0" />
<preference name="UseSwiftLanguageVersion" value="5.2" />
<preference name="SwiftVersion" value="5.2"/>
<config-file target="*-Info.plist" parent="NFCReaderUsageDescription">
<string>This will allow ${PRODUCT_NAME} to scan NFC-capable documents.</string>
</config-file>
Expand All @@ -72,9 +73,9 @@
<preference name="AndroidXEnabled" value="true" />
<preference name="GradlePluginKotlinEnabled" value="false" />
<preference name="GradlePluginKotlinCodeStyle" value="official" />
<preference name="GradlePluginKotlinVersion" value="1.9.10" />
<preference name="GradleVersion" value="8.0" />
<preference name="AndroidGradlePluginVersion" value="8.1.3" />
<preference name="GradlePluginKotlinVersion" value="1.9.24" />
<preference name="GradleVersion" value="8.2" />
<preference name="AndroidGradlePluginVersion" value="8.2.2" />
<preference name="android-minSdkVersion" value="21" />
<preference name="android-maxSdkVersion" value="34" />
<preference name="android-targetSdkVersion" value="34" />
Expand Down
2 changes: 1 addition & 1 deletion demo/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
6 changes: 3 additions & 3 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.jumio.cordova.demo",
"displayName": "DemoApp",
"version": "4.9.0",
"version": "4.10.0",
"description": "A sample Apache Cordova application that responds to the deviceready event.",
"main": "index.js",
"scripts": {
Expand All @@ -11,8 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"cordova": "^12.0.0",
"cordova-android": "^12.0.1",
"cordova-ios": "^7.0.1"
"cordova-android": "^13.0.0"
},
"cordova": {
"plugins": {
Expand All @@ -25,6 +24,7 @@
]
},
"devDependencies": {
"cordova-ios": "^7.1.0",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-enable-multidex": "^0.2.0",
"cordova-plugin-jumio-mobilesdk": "file:.."
Expand Down
22 changes: 11 additions & 11 deletions demo/scripts/podExtension
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end

# Add Localization to Resources group to make iProov work
Expand All @@ -31,21 +31,21 @@ post_install do |installer|
FileUtils.mkdir_p destinationFolder
FileUtils.cp_r './Pods/Jumio/Localization', destinationFolder
resourcesGroup = project.groups.find do |group|
group.name == 'Resources'
group.name == 'Resources'
end
localizableGroup = resourcesGroup.children.select {|group|
group.name == localizableName
group.name == localizableName
}[0]
if localizableGroup.nil?
localizableGroup = resourcesGroup.new_variant_group(localizableName)
localizableGroup = resourcesGroup.new_variant_group(localizableName)
end
Dir.foreach(destinationFolder + '/Localization') do |folder|
if folder.include? ".lproj"
localizableGroup.new_file('./Localization/' + folder + '/Localizable-Jumio.strings')
end
if folder.include? ".lproj"
localizableGroup.new_file('./Localization/' + folder + '/Localizable-Jumio.strings')
end
end
project.native_targets.each do |target|
target.add_resources([localizableGroup])
target.add_resources([localizableGroup])
end
project.save

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-jumio-mobilesdk",
"version": "4.9.0",
"version": "4.10.0",
"description": "Jumio Mobile SDK Plugin for Cordova",
"cordova": {
"id": "cordova-plugin-jumio-mobilesdk",
Expand Down
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-jumio-mobilesdk" version="4.9.0" xmlns="http://apache.org/cordova/ns/plugins/1.0"
<plugin id="cordova-plugin-jumio-mobilesdk" version="4.10.0" xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<name>JumioMobileSDK</name>
<js-module name="JumioMobileSDK" src="www/JumioMobileSDK.js">
Expand Down Expand Up @@ -43,7 +43,7 @@
<source url="https://github.com/CocoaPods/Specs.git"/>
</config>
<pods use-frameworks="true">
<pod name="Jumio" spec="~> 4.9.1"/>
<pod name="Jumio" spec="~> 4.10.0"/>
</pods>
</podspec>
</platform>
Expand Down
4 changes: 2 additions & 2 deletions src/android/plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ repositories {
}

ext {
SDK_VERSION = "4.9.0"
kotlin_version = "1.9.10"
SDK_VERSION = "4.10.0"
kotlin_version = "1.9.24"
}

dependencies {
Expand Down
1 change: 1 addition & 0 deletions src/android/res/values/jumio-styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

<!-- <item name="jumio_circle_item_background">#00B0FF</item>-->
<!-- <item name="jumio_circle_item_foreground">#E0E011</item>-->
<!-- <item name="jumio_doc_type_icon_foreground">#E0E011</item>-->

<!-- <item name="jumio_selection_icon_foreground">#123cff</item>-->

Expand Down
48 changes: 12 additions & 36 deletions src/ios/JumioMobileSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -385,16 +385,10 @@ extension JumioMobileSDK {
customTheme.bubble.backgroundSelected = Jumio.Theme.Value(UIColor(hexString: bubbleBackgroundSelected))
}

if let bubbleCircleItemForeground = customizations["bubbleCircleItemForeground"] as? [String: String?], let light = bubbleCircleItemForeground["light"] as? String, let dark = bubbleCircleItemForeground["dark"] as? String {
customTheme.bubble.circleItemForeground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let bubbleCircleItemForeground = customizations["bubbleCircleItemForeground"] as? String {
customTheme.bubble.circleItemForeground = Jumio.Theme.Value(UIColor(hexString: bubbleCircleItemForeground))
}

if let bubbleCircleItemBackground = customizations["bubbleCircleItemBackground"] as? [String: String?], let light = bubbleCircleItemBackground["light"] as? String, let dark = bubbleCircleItemBackground["dark"] as? String {
customTheme.bubble.circleItemBackground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let bubbleCircleItemBackground = customizations["bubbleCircleItemBackground"] as? String {
customTheme.bubble.circleItemBackground = Jumio.Theme.Value(UIColor(hexString: bubbleCircleItemBackground))
if let bubbleOutline = customizations["bubbleOutline"] as? [String: String?], let light = bubbleOutline["light"] as? String, let dark = bubbleOutline["dark"] as? String {
customTheme.bubble.outline = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let bubbleOutline = customizations["bubbleOutline"] as? String {
customTheme.bubble.outline = Jumio.Theme.Value(UIColor(hexString: bubbleOutline))
}

// Loading, Error
Expand Down Expand Up @@ -441,18 +435,6 @@ extension JumioMobileSDK {
customTheme.scanOverlay.scanOverlay = Jumio.Theme.Value(UIColor(hexString: scanOverlay))
}

if let scanOverlayFill = customizations["scanOverlayFill"] as? [String: String?], let light = scanOverlayFill["light"] as? String, let dark = scanOverlayFill["dark"] as? String {
customTheme.scanOverlay.fill = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let scanOverlayFill = customizations["scanOverlayFill"] as? String {
customTheme.scanOverlay.fill = Jumio.Theme.Value(UIColor(hexString: scanOverlayFill))
}

if let scanOverlayTransparent = customizations["scanOverlayTransparent"] as? [String: String?], let light = scanOverlayTransparent["light"] as? String, let dark = scanOverlayTransparent["dark"] as? String {
customTheme.scanOverlay.scanOverlayTransparent = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let scanOverlayTransparent = customizations["scanOverlayTransparent"] as? String {
customTheme.scanOverlay.scanOverlayTransparent = Jumio.Theme.Value(UIColor(hexString: scanOverlayTransparent))
}

if let scanOverlayBackground = customizations["scanOverlayBackground"] as? [String: String?], let light = scanOverlayBackground["light"] as? String, let dark = scanOverlayBackground["dark"] as? String {
customTheme.scanOverlay.scanBackground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let scanOverlayBackground = customizations["scanOverlayBackground"] as? String {
Expand Down Expand Up @@ -491,16 +473,16 @@ extension JumioMobileSDK {
}

// ScanView
if let scanViewBubbleForeground = customizations["scanViewBubbleForeground"] as? [String: String?], let light = scanViewBubbleForeground["light"] as? String, let dark = scanViewBubbleForeground["dark"] as? String {
customTheme.scanView.bubbleForeground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let scanViewBubbleForeground = customizations["scanViewBubbleForeground"] as? String {
customTheme.scanView.bubbleForeground = Jumio.Theme.Value(UIColor(hexString: scanViewBubbleForeground))
if let scanViewTooltipForeground = customizations["scanViewTooltipForeground"] as? [String: String?], let light = scanViewTooltipForeground["light"] as? String, let dark = scanViewTooltipForeground["dark"] as? String {
customTheme.scanView.tooltipForeground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let scanViewTooltipForeground = customizations["scanViewTooltipForeground"] as? String {
customTheme.scanView.tooltipForeground = Jumio.Theme.Value(UIColor(hexString: scanViewTooltipForeground))
}

if let scanViewBubbleBackground = customizations["scanViewBubbleBackground"] as? [String: String?], let light = scanViewBubbleBackground["light"] as? String, let dark = scanViewBubbleBackground["dark"] as? String {
customTheme.scanView.bubbleBackground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let scanViewBubbleBackground = customizations["scanViewBubbleBackground"] as? String {
customTheme.scanView.bubbleBackground = Jumio.Theme.Value(UIColor(hexString: scanViewBubbleBackground))
if let scanViewTooltipBackground = customizations["scanViewTooltipBackground"] as? [String: String?], let light = scanViewTooltipBackground["light"] as? String, let dark = scanViewTooltipBackground["dark"] as? String {
customTheme.scanView.tooltipBackground = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let scanViewTooltipBackground = customizations["scanViewTooltipBackground"] as? String {
customTheme.scanView.tooltipBackground = Jumio.Theme.Value(UIColor(hexString: scanViewTooltipBackground))
}

if let scanViewForeground = customizations["scanViewForeground"] as? [String: String?], let light = scanViewForeground["light"] as? String, let dark = scanViewForeground["dark"] as? String {
Expand Down Expand Up @@ -534,12 +516,6 @@ extension JumioMobileSDK {
customTheme.searchBubble.foreground = Jumio.Theme.Value(UIColor(hexString: searchBubbleForeground))
}

if let searchBubbleBackgroundSelected = customizations["searchBubbleBackgroundSelected"] as? [String: String?], let light = searchBubbleBackgroundSelected["light"] as? String, let dark = searchBubbleBackgroundSelected["dark"] as? String {
customTheme.searchBubble.backgroundSelected = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let searchBubbleBackgroundSelected = customizations["searchBubbleBackgroundSelected"] as? String {
customTheme.searchBubble.backgroundSelected = Jumio.Theme.Value(UIColor(hexString: searchBubbleBackgroundSelected))
}

if let searchBubbleOutline = customizations["searchBubbleOutline"] as? [String: String?], let light = searchBubbleOutline["light"] as? String, let dark = searchBubbleOutline["dark"] as? String {
customTheme.searchBubble.outline = Jumio.Theme.Value(light: UIColor(hexString: light), dark: UIColor(hexString: dark))
} else if let searchBubbleOutline = customizations["searchBubbleOutline"] as? String {
Expand Down

0 comments on commit 32e175b

Please sign in to comment.