Skip to content

Commit

Permalink
Final commit for 3.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Mar 17, 2021
1 parent 77558a5 commit 2d32580
Show file tree
Hide file tree
Showing 12 changed files with 184 additions and 289 deletions.
78 changes: 37 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,14 @@

Official Jumio Mobile SDK plugin for Apache Cordova

This plugin is compatible with version 3.8.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)
- [Usage](#usage)
- [Netverify & Fastfill](#Netverify-&-Fastfill)
- [Document Verification](#document-verification)
- [BAM Checkout](#bam-checkout)
- [Customization](#customization)
- [Callbacks](#callbacks)
- [FAQ](#faq)
- [Support](#support)
This plugin is compatible with version 3.9.1 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact Jumio Support at [email protected] or https://support.jumio.com

## 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: 10.0.0
* Cordova Android: 9.0.0
* Cordova iOS: 6.1.1
* Cordova iOS: 6.2.0

## Setup

Expand All @@ -34,16 +19,18 @@ 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#v3.8.0
cordova plugin add https://github.com/Jumio/mobile-cordova.git#v3.9.1
```

## Integration

### iOS
Manual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v3.8.0#basics)

Manual integration or dependency management via cocoapods possible, please see [the official documentation of the Jumio Mobile SDK for iOS](https://github.com/Jumio/mobile-sdk-ios/tree/v3.9.0#basic-setup)

### Android
Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v3.8.0/README.md#permissions)

Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v3.9.1/README.md#permissions)

To use the native Jumio Android component, your App needs to support AndroidX. This can be enabled by adding the following preference to your config.xml:

Expand All @@ -55,10 +42,11 @@ For other build issues, refer to the The [FAQ section](#faq) at the bottom.

## Usage

### Netverify & Fastfill
### Netverify / Fastfill

To initialize the SDK, perform the following call.

```
```javascript
Jumio.initNetverify(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
```

Expand Down Expand Up @@ -87,7 +75,7 @@ Configure the SDK with the *configuration*-Object.

Initialization example with configuration.

```
```javascript
Jumio.initNetverify("API_TOKEN", "API_SECRET", "US", {
requireVerification: false,
userReference: "USERREFERENCE",
Expand All @@ -103,7 +91,7 @@ Jumio.initNetverify("API_TOKEN", "API_SECRET", "US", {

If you are using eMRTD scanning, following lines are needed in your Manifest file:

```
```javascript
-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}
-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
Expand All @@ -120,30 +108,31 @@ Add the needed dependencies following [this chapter](https://github.com/Jumio/mo

Enable eMRTD by using the following method in your native android code:

```
```javascript
netverifySDK.setEnableEMRTD(true);
```


As soon as the sdk is initialized, the sdk is started by the following call.

```
```javascript
Jumio.startNetverify(successCallback, errorCallback);
```

Example

```
```javascript
Jumio.startNetverify(function(documentData) {
// YOUR CODE
}, function(error) {
// YOUR CODE
});
```
### Document Verification

To initialize the SDK, perform the following call.

```
```javascript
Jumio.initDocumentVerification(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
```

Expand Down Expand Up @@ -195,7 +184,7 @@ Possible types:

Initialization example with configuration.

```
```javascript
Jumio.initDocumentVerification("API_TOKEN", "API_SECRET", "US", {
type: "BC",
userReference: "USERREFERENCE",
Expand All @@ -207,13 +196,13 @@ Jumio.initDocumentVerification("API_TOKEN", "API_SECRET", "US", {

As soon as the SDK is initialized, the SDK is started by the following call.

```
```javascript
Jumio.startDocumentVerification(successCallback, errorCallback);
```

Example

```
```javascript
Jumio.startDocumentVerification(function(documentData) {
// YOUR CODE
}, function(error) {
Expand All @@ -222,14 +211,17 @@ Jumio.startDocumentVerification(function(documentData) {
```

### BAM Checkout

To Initialize the SDK, perform the following call.

```
```javascript
Jumio.initBAM(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
```

Datacenter can either be **US**, **EU** or **SG**.



Configure the SDK with the *configuration*-Object.

| Configuration | Datatype | Description |
Expand All @@ -250,7 +242,7 @@ Configure the SDK with the *configuration*-Object.

Initialization example with configuration.

```
```javascript
Jumio.initBAM("API_TOKEN", "API_SECRET", "US", {
cardHolderNameRequired: false,
cvvRequired: true,
Expand All @@ -262,13 +254,13 @@ Jumio.initBAM("API_TOKEN", "API_SECRET", "US", {

As soon as the sdk is initialized, the sdk is started by the following call.

```
```javascript
Jumio.startBAM(successCallback, errorCallback);
```

Example

```
```javascript
Jumio.startBAM(function(cardInformation) {
// YOUR CODE
}, function(error) {
Expand All @@ -281,13 +273,13 @@ Jumio.startBAM(function(cardInformation) {
### Android

#### Netverify
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.8.0/docs/integration_id-verification-fastfill.md#customization).
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.9.1/docs/integration_id-verification-fastfill.md#customization).

#### BAM Checkout
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.8.0/docs/integration_bam-checkout.md#customization).
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.9.1/docs/integration_bam-checkout.md#customization).

#### Document Verification
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.8.0/docs/integration_document-verification.md#customization).
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v3.9.1/docs/integration_document-verification.md#customization).

### iOS
The SDK can be customized to the respective needs. You can pass the following customization options to the initializer:
Expand Down Expand Up @@ -336,7 +328,8 @@ Jumio.initNetverify("API_TOKEN", "API_SECRET", "US", {
);
```

## Callbacks
## 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/netverify/callback.md).

The JSONObject with all the extracted data that is returned for the specific products is described in the following subchapters:
Expand Down Expand Up @@ -404,19 +397,22 @@ The JSONObject with all the extracted data that is returned for the specific pro
| cardAccountNumberValid | BOOL | | True if account number code valid, otherwise false |

### Document Verification

No data returned.

# FAQ

This is a list of common Android build issues and how to resolve them:
* Gradle plugin 4.X not supported, please install 5.X
--> Change the version in the `gradle-wrapper.properties` file
-> Change the version in the gradle-wrapper.properties file

* 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. Please refer to https://stackoverflow.com/questions/28017540/cordova-plugin-javascript-gets-corrupted-when-added-to-project/28264312#28264312 and fix the duplicated `cordova.define()` call in these files as mentioned in the post.
-> 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.

# Support

## Contact

If you have any questions regarding our implementation guide please contact Jumio Customer Service at [email protected] or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com.

## Licenses
Expand Down
29 changes: 29 additions & 0 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,36 @@ Update your SDK credentials in www/js/index.js and run the following commands.
```
cordova plugin add --link ../
cordova prepare
```
## Android specific

Navigate to platforms/android/build.gradle and replace the generated buildscript with the following.

```
buildscript {
ext.kotlin_version = '1.4.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
```

Navigate to platforms/android/gradle.properties and add the following line.

```
android.jetifier.blacklist=bcprov-jdk15on
```

## Run the application

```
cordova run android
# OR
cordova run ios
Expand Down
4 changes: 2 additions & 2 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="3.8.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.jumio.cordova.demo" version="3.9.1" 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 All @@ -21,7 +21,7 @@
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<preference name="deployment-target" value="10.0" />
<preference name="deployment-target" value="11.0" />
</platform>
<engine name="ios" spec="^5.0.1" />
<preference name="AndroidXEnabled" value="true" />
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-5.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Loading

0 comments on commit 2d32580

Please sign in to comment.