Official Jumio Mobile SDK plugin for Apache Cordova
This plugin is compatible with version 4.4.0 of the Jumio SDK (4.4.0 for iOS, 4.4.1 for Android). If you have questions, please reach out to your Account Manager or contact Jumio Support.
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: 11.1.0
- Cordova Android: 11.0.0
- Cordova iOS: 6.2.0
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.4.0
Manual integration or dependency management via cocoapods possible, please see the official documentation of the Jumio Mobile SDK for iOS
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 Rules
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.
- 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.
- As soon as the SDK is initialized, the sdk is started by the following call.
Jumio.start(successCallback, errorCallback);
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
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 |
---|
iProovAnimationForeground |
iProovAnimationBackground |
iProovFilterForegroundColor |
iProovFilterBackgroundColor |
iProovTitleTextColor |
iProovCloseButtonTintColor |
iProovSurroundColor |
iProovPromptTextColor |
iProovPromptBackgroundColor |
genuinePresenceAssuranceReadyOvalStrokeColor |
genuinePresenceAssuranceNotReadyOvalStrokeColor |
livenessAssuranceOvalStrokeColor |
livenessAssuranceCompletedOvalStrokeColor |
primaryButtonBackground |
primaryButtonBackgroundPressed |
primaryButtonBackgroundDisabled |
primaryButtonText |
secondaryButtonBackground |
secondaryButtonBackgroundPressed |
secondaryButtonBackgroundDisabled |
secondaryButtonText |
bubbleBackground |
bubbleForeground |
bubbleBackgroundSelected |
bubbleCircleItemForeground |
bubbleCircleItemBackground |
bubbleSelectionIconForeground |
loadingCirclePlain |
loadingCircleGradientStart |
loadingCircleGradientEnd |
loadingErrorCircleGradientStart |
loadingErrorCircleGradientEnd |
loadingCircleIcon |
scanOverlay |
scanOverlayFill |
scanOverlayTransparent |
scanOverlayBackground |
nfcPassportCover |
nfcPassportPageDark |
nfcPassportPageLight |
nfcPassportForeground |
nfcPhoneCover |
scanViewBubbleForeground |
scanViewBubbleBackground |
scanViewForeground |
scanViewAnimationBackground |
scanViewAnimationShutter |
searchBubbleBackground |
searchBubbleForeground |
searchBubbleListItemSelected |
confirmationImageBackground |
confirmationImageBackgroundBorder |
confirmationIndicatorActive |
confirmationIndicatorDefault |
background |
navigationIconColor |
textForegroundColor |
primaryColor |
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"
});
For more information about how to set specific SDK parameters (callbackUrl, userReference, country, ...), please refer to our API Guide.
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.
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.
Parameter | Type | Max. length | Description |
---|---|---|---|
selectedCountry | String | 3 | ISO 3166-1 alpha-3 country code as provided or selected |
selectedDocumentType | String | 16 | PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA |
idNumber | String | 100 | Identification number of the document |
personalNumber | String | 14 | Personal number of the document |
issuingDate | Date | Date of issue | |
expiryDate | Date | Date of expiry | |
issuingCountry | String | 3 | Country of issue as (ISO 3166-1 alpha-3) country code |
lastName | String | 100 | Last name of the customer |
firstName | String | 100 | First name of the customer |
dob | Date | Date of birth | |
gender | String | 1 | m, f or x |
originatingCountry | String | 3 | Country of origin as (ISO 3166-1 alpha-3) country code |
addressLine | String | 64 | Street name |
city | String | 64 | City |
subdivision | String | 3 | Last three characters of ISO 3166-2:US state code |
postCode | String | 15 | Postal code |
mrzData | MRZ-DATA | MRZ data, see table below | |
optionalData1 | String | 50 | Optional field of MRZ line 1 |
optionalData2 | String | 50 | Optional field of MRZ line 2 |
placeOfBirth | String | 255 | Place of Birth |
MRZ-Data
Parameter | Type | Max. length | Description |
---|---|---|---|
format | String | 8 | MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN |
line1 | String | 50 | MRZ line 1 |
line2 | String | 50 | MRZ line 2 |
line3 | String | 50 | MRZ line 3 |
idNumberValid | BOOL | True if ID number check digit is valid, otherwise false | |
dobValid | BOOL | True if date of birth check digit is valid, otherwise false | |
expiryDateValid | BOOL | True if date of expiry check digit is valid or not available, otherwise false | |
personalNumberValid | BOOL | True if personal number check digit is valid or not available, otherwise false | |
compositeValid | BOOL | True if composite check digit is valid, otherwise false |
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 thegradle-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 duplicatedcordova.define()
call in these files as mentioned in the post.
After installing Cocoapods, please localize your iOS application using the languages provided at the following path:
ios -> Pods -> Jumio -> Localizations -> xx.lproj
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
For more information, please refer to our iOS guides.
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.
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.
© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306