4.9.0 • Published 2 months ago

jumio-cordova-plugin-mobilesdk v4.9.0

Weekly downloads
24
License
-
Repository
github
Last release
2 months ago

Plugin for Apache Cordova

Official Jumio Mobile SDK plugin for Apache Cordova

This plugin is compatible with version 4.9.0 of the Jumio SDK. If you have questions, please reach out to your Account Manager or contact Jumio Support.

Table of Contents

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

Setup

Create Cordova project and add our plugin

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
cd platforms/ios && pod install

Integration

iOS

Manual integration or dependency management via cocoapods possible, please see the official documentation of the Jumio Mobile SDK for iOS

NFC

Check out the NFC setup guide.

Digital Identity

Check out the Digital Identity setup guide.

Device Risk

To include Jumio's Device Risk functionality, you need to add pod Jumio/DeviceRisk to your Podfile.

Android

Add required permissions for the products as described in chapter 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:

<preference name="AndroidXEnabled" value="true" />

Proguard

For information on Android Proguard Rules concerning the Jumio SDK, please refer to our Android Guides.

For other build issues, refer to the The FAQ section at the bottom.

Usage

  1. To initialize the SDK, perform the following call.
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.

  1. As soon as the SDK is initialized, the sdk is started by the following call.
Jumio.start(successCallback, errorCallback);

Customization

Android

The JumioSDK colors can be customized by overriding the custom theme AppThemeCustomJumio. The styles-file for Android is automatically copied to your app by the rule in the plugin.xml. An example customization of all values that can be found in the jumio-styles.xml of the plugin

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:

Customization key
facePrimary
faceSecondary
faceOutline
faceAnimationForeground
iProovFilterForegroundColor
iProovFilterBackgroundColor
iProovTitleTextColor
iProovCloseButtonTintColor
iProovSurroundColor
iProovPromptTextColor
iProovPromptBackgroundColor
genuinePresenceAssuranceReadyOvalStrokeColor
genuinePresenceAssuranceNotReadyOvalStrokeColor
livenessAssuranceOvalStrokeColor
livenessAssuranceCompletedOvalStrokeColor
primaryButtonBackground
primaryButtonBackgroundPressed
primaryButtonBackgroundDisabled
primaryButtonForeground
primaryButtonForegroundPressed
primaryButtonForegroundDisabled
primaryButtonOutline
secondaryButtonBackground
secondaryButtonBackgroundPressed
secondaryButtonBackgroundDisabled
secondaryButtonForeground
secondaryButtonForegroundPressed
secondaryButtonForegroundDisabled
secondaryButtonOutline
bubbleBackground
bubbleForeground
bubbleBackgroundSelected
bubbleCircleItemForeground
bubbleCircleItemBackground
loadingCirclePlain
loadingCircleGradientStart
loadingCircleGradientEnd
loadingErrorCircleGradientStart
loadingErrorCircleGradientEnd
loadingCircleIcon
scanOverlay
scanOverlayFill
scanOverlayTransparent
scanOverlayBackground
nfcPassportCover
nfcPassportPageDark
nfcPassportPageLight
nfcPassportForeground
nfcPhoneCover
scanViewBubbleForeground
scanViewBubbleBackground
scanViewForeground
scanViewDocumentShutter
scanViewFaceShutter
searchBubbleBackground
searchBubbleForeground
searchBubbleBackgroundSelected
searchBubbleOutline
confirmationImageBackground
confirmationImageBackgroundBorder
confirmationIndicatorActive
confirmationIndicatorDefault
confirmationImageBorder
background
navigationIconColor
textForegroundColor
primaryColor
selectionIconForeground

All colors are provided with a HEX string with the following formats: #ff00ff or #66ff00ff if you want to set the alpha level.

Customization example

Example for setting color based on Dark or Light mode

Jumio.start(successCallback, errorCallback, {
    primaryColor: { light:"ffffff", dark:"000000" }
    primaryButtonBackground: { light:ffffff, dark:"000000" }
});

Example for setting same color for both Dark and Light mode

Jumio.start(successCallback, errorCallback, {
    primaryColor: "ffffff"
    primaryButtonBackground: "ffffff"
});

Configuration

For more information about how to set specific SDK parameters (callbackUrl, userReference, country, ...), please refer to our API Guide.

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.

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.

Result

ParameterTypeMax. lengthDescription
selectedCountryString3ISO 3166-1 alpha-3 country code as provided or selected
selectedDocumentTypeString16PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA
selectedDocumentSubTypeStringSub type of the scanned ID
idNumberString100Identification number of the document
personalNumberString14Personal number of the document
issuingDateDateDate of issue
expiryDateDateDate of expiry
issuingCountryString3Country of issue as (ISO 3166-1 alpha-3) country code
lastNameString100Last name of the customer
firstNameString100First name of the customer
dobDateDate of birth
genderString1m, f or x
originatingCountryString3Country of origin as (ISO 3166-1 alpha-3) country code
addressLineString64Street name
cityString64City
subdivisionString3Last three characters of ISO 3166-2:US state code
postCodeString15Postal code
mrzDataMRZ-DATAMRZ data, see table below
optionalData1String50Optional field of MRZ line 1
optionalData2String50Optional field of MRZ line 2
placeOfBirthString255Place of Birth

MRZ-Data

ParameterTypeMax. lengthDescription
formatString8MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN
line1String50MRZ line 1
line2String50MRZ line 2
line3String50MRZ line 3
idNumberValidBOOLTrue if ID number check digit is valid, otherwise false
dobValidBOOLTrue if date of birth check digit is valid, otherwise false
expiryDateValidBOOLTrue if date of expiry check digit is valid or not available, otherwise false
personalNumberValidBOOLTrue if personal number check digit is valid or not available, otherwise false
compositeValidBOOLTrue if composite check digit is valid, otherwise false

Local Models for JumioDocfinder

If you are using our JumioDocFinder module, you can download our encrypted models and add them to your bundle from here and here.

We recommend to download the files and add them to your project without changing their names (the same way you add Localization files). This will save two network requests on runtime to download these files.

iOS

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/)

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
  • Build-tool 32.0.0 is missing DX (on Windows) - in this Stackoverflow post
  • Gradle plugin 4.X not supported, please install 5.X
    --> 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 fix the duplicated cordova.define() call in these files as mentioned in the post.

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

This happens due to Xcode 13 introducing a new option to their App Store Distribution Options:

"Manage Version and Build Number" (see image below)

If checked, this option changes the version and build number of all content of your app to the overall application version, including third-party frameworks. This option is enabled by default. Please make sure to disable this option when archiving / exporting your application to the App Store. Otherwise, the Jumio SDK version check, which ensures all bundled frameworks are up to date, will fail.

Xcode13 Issue

Alternatively, it is also possible to set the key manageAppVersionAndBuildNumber in the exportOptions.plist to false:

<key>manageAppVersionAndBuildNumber</key>
<false/>

iOS Localization

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

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 ['DatadogRUM', 'DatadogCore', 'DatadogInternal'].include? target.name
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
      end
    end
  end
end

For more information, please refer to our iOS guides.

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

The software contains third-party open source software. For more information, please see Android licenses and iOS licenses

This software is based in part on the work of the Independent JPEG Group.

Copyright

© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306

4.9.0

2 months ago

3.9.4

5 months ago

3.9.3

6 months ago

4.7.1

7 months ago

4.6.2

7 months ago

4.7.0

7 months ago

4.6.1

8 months ago

4.5.1

7 months ago

4.4.0

1 year ago

4.2.0

2 years ago

4.1.0

2 years ago

4.0.0

2 years ago

3.9.2

3 years ago

3.9.1

3 years ago

3.8.0

3 years ago

3.7.1

4 years ago

3.3.1

5 years ago

3.1.0-3

5 years ago

3.1.0-2

5 years ago

3.1.0-1

5 years ago

3.1.0

5 years ago