diff --git a/README.md b/README.md index 18f74a7..b03bbfe 100755 --- a/README.md +++ b/README.md @@ -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 support@jumio.com 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 @@ -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: @@ -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(, , , {configuration}); ``` @@ -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", @@ -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.** {*;} @@ -120,20 +108,20 @@ 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) { @@ -141,9 +129,10 @@ Jumio.startNetverify(function(documentData) { }); ``` ### Document Verification + To initialize the SDK, perform the following call. -``` +```javascript Jumio.initDocumentVerification(, , , {configuration}); ``` @@ -195,7 +184,7 @@ Possible types: Initialization example with configuration. -``` +```javascript Jumio.initDocumentVerification("API_TOKEN", "API_SECRET", "US", { type: "BC", userReference: "USERREFERENCE", @@ -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) { @@ -222,14 +211,17 @@ Jumio.startDocumentVerification(function(documentData) { ``` ### BAM Checkout + To Initialize the SDK, perform the following call. -``` +```javascript Jumio.initBAM(, , , {configuration}); ``` Datacenter can either be **US**, **EU** or **SG**. + + Configure the SDK with the *configuration*-Object. | Configuration | Datatype | Description | @@ -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, @@ -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) { @@ -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: @@ -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: @@ -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 support@jumio.com 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 diff --git a/demo/README.md b/demo/README.md index bd54dc8..cb13dbc 100755 --- a/demo/README.md +++ b/demo/README.md @@ -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 diff --git a/demo/config.xml b/demo/config.xml index e1bd4b4..e54b669 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. @@ -21,7 +21,7 @@ - + diff --git a/demo/gradle/wrapper/gradle-wrapper.properties b/demo/gradle/wrapper/gradle-wrapper.properties index 42cb42b..b076c3b 100755 --- a/demo/gradle/wrapper/gradle-wrapper.properties +++ b/demo/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/demo/package-lock.json b/demo/package-lock.json index 6ba7912..abe5681 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -1,6 +1,6 @@ { "name": "com.jumio.cordova.demo", - "version": "3.8.0", + "version": "3.9.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -15,25 +15,25 @@ } }, "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", "requires": { - "@nodelib/fs.stat": "2.0.3", + "@nodelib/fs.stat": "2.0.4", "run-parallel": "^1.1.9" } }, "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==" }, "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", "requires": { - "@nodelib/fs.scandir": "2.1.3", + "@nodelib/fs.scandir": "2.1.4", "fastq": "^1.6.0" } }, @@ -43,12 +43,20 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "android-versions": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.5.0.tgz", - "integrity": "sha512-/GWUAqa2OJNlDF5VGSe3SR1QMHEPXxx54Ur56r0qQC0H9FlBr7kyBF2SgVEhzFCPbrW4UcYgVuWrq/2Ty3QvXg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.6.0.tgz", + "integrity": "sha512-ojC2Ig7b/KJ6iNtR8e4bacmOsJyEkoERk3CKMIsnH7kJz5z6551NMbrVaRb7KXYavu1d74Uhml/bfcmqT3nAcg==", "dev": true, "requires": { - "semver": "^5.4.1" + "semver": "^5.7.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "ansi": { @@ -72,9 +80,9 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "big-integer": { "version": "1.6.48", @@ -134,110 +142,14 @@ "which": "^2.0.2" }, "dependencies": { - "bplist-parser": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", - "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", - "dev": true, - "requires": { - "big-integer": "^1.6.44" - } - }, - "cordova-common": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-4.0.2.tgz", - "integrity": "sha512-od7aNShyuBajzPY83mUEO8tERwwWdFklXETHiXP5Ft87CWeo/tSuwNPFztyTy8XYc74yXdogXKPTJeUHuVzB8Q==", - "dev": true, - "requires": { - "@netflix/nerror": "^1.1.3", - "ansi": "^0.3.1", - "bplist-parser": "^0.2.0", - "cross-spawn": "^7.0.1", - "elementtree": "^0.1.7", - "endent": "^1.4.1", - "fast-glob": "^3.2.2", - "fs-extra": "^9.0.0", - "glob": "^7.1.6", - "plist": "^3.0.1", - "q": "^1.5.1", - "read-chunk": "^3.2.0", - "strip-bom": "^4.0.0", - "underscore": "^1.9.2" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "fs-extra": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", - "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^1.0.0" - } - }, - "jsonfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", - "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^1.0.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", "dev": true, "requires": { - "isexe": "^2.0.0" + "abbrev": "1", + "osenv": "^0.1.4" } } } @@ -264,30 +176,20 @@ } }, "cordova-ios": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-6.1.1.tgz", - "integrity": "sha512-WHNvjVhkuwRpq95rISVXtcRyd6UGZapbmU+hO/CAn1c0AIT5WnO8mg2mOjv0WDNa0mt/V5P+N2Vig1UWwfxa5Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-6.2.0.tgz", + "integrity": "sha512-sLjZg2QBI1SpQVwfe0MSn89YNVkBGLW9Q1vcFJBsqKBrhvoEOJ5Ytq0gwqdhgTOGzlwJUfxC6OHM3jcsRjtYrw==", "requires": { "cordova-common": "^4.0.2", - "fs-extra": "^9.0.0", + "fs-extra": "^9.1.0", "ios-sim": "^8.0.2", - "nopt": "^4.0.3", + "nopt": "^5.0.0", "plist": "^3.0.1", - "semver": "^7.3.2", + "semver": "^7.3.4", "unorm": "^1.6.0", "which": "^2.0.2", "xcode": "^3.0.1", "xml-escape": "^1.1.0" - }, - "dependencies": { - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "cordova-plugin-jumio-mobilesdk": { @@ -337,9 +239,9 @@ } }, "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -351,49 +253,6 @@ "onetime": "^5.1.0", "signal-exit": "^3.0.2", "strip-final-newline": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } } }, "extsprintf": { @@ -402,9 +261,9 @@ "integrity": "sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=" }, "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -420,9 +279,9 @@ "integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw==" }, "fastq": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz", - "integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", "requires": { "reusify": "^1.0.4" } @@ -474,17 +333,17 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" }, "human-signals": { "version": "1.1.1", @@ -571,9 +430,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lru-cache": { "version": "6.0.0", @@ -618,12 +477,11 @@ } }, "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1" } }, "npm-run-path": { @@ -633,14 +491,6 @@ "dev": true, "requires": { "path-key": "^3.0.0" - }, - "dependencies": { - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - } } }, "objectorarray": { @@ -668,17 +518,20 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true }, "osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" @@ -748,6 +601,11 @@ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, + "queue-microtask": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", + "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==" + }, "read-chunk": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", @@ -763,9 +621,12 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } }, "sax": { "version": "1.1.4", @@ -773,10 +634,12 @@ "integrity": "sha1-dLbTPJrh4AFRDxeakRaFiPGu2qk=" }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } }, "shebang-command": { "version": "2.0.0", @@ -857,9 +720,9 @@ } }, "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==" + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.0.tgz", + "integrity": "sha512-21rQzss/XPMjolTiIezSu3JAjgagXKROtNrYFEOWK109qY1Uv2tVjPTZ1ci2HgvQDA16gHYSthQIJfB+XId/rQ==" }, "universalify": { "version": "2.0.0", diff --git a/demo/package.json b/demo/package.json index 0ce3d82..811c770 100755 --- a/demo/package.json +++ b/demo/package.json @@ -1,7 +1,7 @@ { "name": "com.jumio.cordova.demo", "displayName": "DemoApp", - "version": "3.8.0", + "version": "3.9.1", "description": "A sample Apache Cordova application that responds to the deviceready event.", "main": "index.js", "scripts": { @@ -10,7 +10,7 @@ "author": "Apache Cordova Team", "license": "Apache-2.0", "dependencies": { - "cordova-ios": "^6.1.1" + "cordova-ios": "^6.2.0" }, "cordova": { "plugins": { diff --git a/package-lock.json b/package-lock.json index f048b51..1770f60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "cordova-plugin-jumio-mobilesdk", - "version": "3.8.0", + "version": "3.9.1", "lockfileVersion": 1 } diff --git a/package.json b/package.json index 1ad296c..da3c705 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-jumio-mobilesdk", - "version": "3.8.0", + "version": "3.9.1", "description": "Jumio Mobile SDK Plugin for Cordova", "cordova": { "id": "cordova-plugin-jumio-mobilesdk", diff --git a/plugin.xml b/plugin.xml index 5101d09..a5c2e3e 100755 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + JumioMobileSDK @@ -23,7 +23,7 @@ - + diff --git a/src/android/JumioMobileSDK.java b/src/android/JumioMobileSDK.java index 3e89268..21a8d88 100755 --- a/src/android/JumioMobileSDK.java +++ b/src/android/JumioMobileSDK.java @@ -278,8 +278,6 @@ private void initNetverify(JSONArray data) { netverifySDK.setReportingCriteria(options.getString(key)); } else if (key.equalsIgnoreCase("userReference")) { netverifySDK.setUserReference(options.getString(key)); - } else if (key.equalsIgnoreCase("enableEpassport")) { - netverifySDK.setEnableEMRTD(options.getBoolean(key)); } else if (key.equalsIgnoreCase("enableWatchlistScreening")) { NVWatchlistScreening watchlistScreeningState; switch (options.getString(key).toLowerCase()) { diff --git a/src/android/plugin.gradle b/src/android/plugin.gradle index 79d34f2..16ccebf 100644 --- a/src/android/plugin.gradle +++ b/src/android/plugin.gradle @@ -1,3 +1,6 @@ +apply plugin: 'kotlin-android' +apply plugin: 'kotlin-parcelize' + repositories { google() jcenter() @@ -5,8 +8,8 @@ repositories { } ext { - SDK_VERSION = "3.8.0" - kotlin_version = "1.4.21" + SDK_VERSION = "3.9.1" + kotlin_version = "1.4.30" } dependencies { @@ -23,8 +26,7 @@ dependencies { //for core: implementation "androidx.appcompat:appcompat:1.2.0" - implementation "androidx.room:room-runtime:2.2.5" - implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0" + implementation "androidx.room:room-runtime:2.2.6" //for nv: implementation "com.google.android.material:material:1.2.1" @@ -34,21 +36,21 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0" //only for nv-barcode-vision - implementation ("com.google.android.gms:play-services-vision:20.1.2"){ + implementation ("com.google.android.gms:play-services-vision:20.1.3"){ exclude group: 'com.android.support', module:'support-v4' } //only for nv-nfc - implementation "org.jmrtd:jmrtd:0.7.19" + implementation "org.jmrtd:jmrtd:0.7.24" implementation "org.ejbca.cvc:cert-cvc:1.4.6" - implementation "org.bouncycastle:bcprov-jdk15on:1.65" + implementation "org.bouncycastle:bcprov-jdk15on:1.67" implementation "net.sf.scuba:scuba-sc-android:0.0.18" //only for face liveness - implementation ("com.iproov.sdk:iproov:6.1.0"){ + implementation ("com.iproov.sdk:iproov:6.3.1"){ exclude group: 'org.json', module:'json' } - implementation "androidx.core:core-ktx:1.3.1" + implementation "androidx.core:core-ktx:1.3.2" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } \ No newline at end of file diff --git a/src/ios/JumioMobileSDK.m b/src/ios/JumioMobileSDK.m index dcf3d2b..51dcb47 100755 --- a/src/ios/JumioMobileSDK.m +++ b/src/ios/JumioMobileSDK.m @@ -539,7 +539,7 @@ - (void) bamCheckoutViewController:(BAMCheckoutViewController *)controller didCa #pragma mark - Netverify Delegates -- (void)netverifyViewController:(NetverifyViewController *)netverifyViewController didFinishWithDocumentData:(NetverifyDocumentData *)documentData scanReference:(NSString *)scanReference { +- (void)netverifyViewController:(NetverifyViewController *)netverifyViewController didFinishWithDocumentData:(NetverifyDocumentData *)documentData scanReference:(NSString *)scanReference accountId:(NSString* _Nullable)accountId authenticationResult:(BOOL)authenticationResult { self.initiateSuccessfulNetverify = NO; NSDictionary *result = [[NSMutableDictionary alloc] init]; @@ -589,6 +589,10 @@ - (void)netverifyViewController:(NetverifyViewController *)netverifyViewControll } else if (documentData.extractionMethod == NetverifyExtractionMethodNone) { [result setValue: @"NONE" forKey: @"extractionMethod"]; } + if (accountId) { + [result setValue: accountId forKey: @"accountId"]; + } + [result setValue: [NSNumber numberWithBool: authenticationResult] forKey: @"authenticationResult"]; // MRZ data if available if (documentData.mrzData != nil) { @@ -632,16 +636,16 @@ - (void)netverifyViewController:(NetverifyViewController *)netverifyViewControll - (void)netverifyViewController:(NetverifyViewController *)netverifyViewController didFinishInitializingWithError:(NetverifyError *)error { if (error != nil) { - [self sendNetverifyError: error scanReference: nil]; + [self sendNetverifyError: error scanReference: nil accountId: nil]; return; } self.initiateSuccessfulNetverify = YES; } -- (void)netverifyViewController:(NetverifyViewController *)netverifyViewController didCancelWithError:(NetverifyError *)error scanReference:(NSString *)scanReference { +- (void)netverifyViewController:(NetverifyViewController *)netverifyViewController didCancelWithError:(NetverifyError *)error scanReference:(NSString *)scanReference accountId:(NSString* _Nullable)accountId { self.initiateSuccessfulNetverify = NO; - [self sendNetverifyError: error scanReference: scanReference]; + [self sendNetverifyError: error scanReference: scanReference accountId: accountId]; [self.viewController dismissViewControllerAnimated: YES completion: nil]; } @@ -685,13 +689,16 @@ - (void)sendError:(NSError *)error scanReference:(NSString *)scanReference { [self.viewController dismissViewControllerAnimated: YES completion: nil]; } -- (void)sendNetverifyError:(NetverifyError *)error scanReference:(NSString *)scanReference { +- (void)sendNetverifyError:(NetverifyError *)error scanReference:(NSString *)scanReference accountId:(NSString* _Nullable)accountId { NSMutableDictionary *result = [[NSMutableDictionary alloc] init]; [result setValue: error.code forKey: @"errorCode"]; [result setValue: error.message forKey: @"errorMessage"]; if (scanReference) { [result setValue: scanReference forKey: @"scanReference"]; } + if (accountId) { + [result setValue: accountId forKey: @"accountId"]; + } CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus: CDVCommandStatus_ERROR messageAsDictionary: result]; [self.commandDelegate sendPluginResult: pluginResult callbackId: self.callbackId];