Skip to content

Commit

Permalink
Final commit for 4.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Oct 6, 2023
1 parent 288cea0 commit c25bfe4
Show file tree
Hide file tree
Showing 15 changed files with 152 additions and 74 deletions.
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@

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)
- [Setup](#setup)
- [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
Expand All @@ -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
```

Expand Down Expand Up @@ -69,7 +70,7 @@ Jumio.initialize(<AUTHORIZATION_TOKEN>, <DATACENTER>);

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.

Expand All @@ -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 |
|:------------------------------------------------|
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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|
Expand Down
22 changes: 21 additions & 1 deletion 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.5.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.7.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,26 @@
<preference name="deployment-target" value="11.0" />
<preference name="UseSwiftLanguageVersion" value="5.2" />
<hook type="before_run" src="scripts/podEdit.js" />
<config-file target="*-Info.plist" parent="NFCReaderUsageDescription">
<string>This will allow ${PRODUCT_NAME} to scan NFC-capable documents.</string>
</config-file>
<config-file target="*-Info.plist" parent="com.apple.developer.nfc.readersession.iso7816.select-identifiers">
<array>
<string>A0000002471001</string>
</array>
</config-file>
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.jumio.cordova</string>
</array>
</dict>
</array>
</config-file>
</platform>
<preference name="AndroidXEnabled" value="true" />
<preference name="GradlePluginKotlinEnabled" value="false" />
Expand Down
14 changes: 7 additions & 7 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 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.6.1",
"version": "4.7.0",
"description": "A sample Apache Cordova application that responds to the deviceready event.",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions demo/scripts/podExtension
Original file line number Diff line number Diff line change
@@ -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|
Expand Down Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion demo/www/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
}
9 changes: 7 additions & 2 deletions demo/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@
<body>
<div class="app">
<h1>Jumio Mobile SDK</h1>
<input id="tokenInput" type="text" placeholder="Authorization token">
<button id="start" type="button">Start</button>
<input id="tokenInput" type="text" class="inputText" placeholder="Authorization token">
<div>
<button id="buttonUS" type="button" class="button">US</button>
<button id="buttonEU" type="button" class="button">EU</button>
<button id="buttonSG" type="button" class="button">SG</button>
</div>
<button id="start" type="button" class="button">Start</button>
<p id="logtitle" style="visibility: hidden">Log: </p>
<p id="log"></p>
</div>
Expand Down
51 changes: 37 additions & 14 deletions demo/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,30 @@
* 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
//
// 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);
Expand All @@ -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";
}
};

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.6.1",
"version": "4.7.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.6.1" xmlns="http://apache.org/cordova/ns/plugins/1.0"
<plugin id="cordova-plugin-jumio-mobilesdk" version="4.7.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.6.1"/>
<pod name="Jumio" spec="4.7.0"/>
</pods>
</podspec>
</platform>
Expand Down
3 changes: 1 addition & 2 deletions src/android/JumioMobileSDK.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions src/android/plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Loading

0 comments on commit c25bfe4

Please sign in to comment.