Skip to content

Commit

Permalink
Final commit for 4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Mar 19, 2024
1 parent 3b3112e commit f6fab98
Show file tree
Hide file tree
Showing 14 changed files with 280 additions and 5,920 deletions.
98 changes: 67 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Official Jumio Mobile SDK plugin for Apache Cordova

This plugin is compatible with version 4.7.0 of the Jumio iOS SDK and version 4.7.1 of the Jumio Android SDK.
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](#support).

# Table of Contents
Expand All @@ -20,6 +20,7 @@ If you have questions, please reach out to your Account Manager or contact [Jumi
- [Android Issues](#android-issues)
- [iOS Issues](#ios-issues)
- [Framework not found iProov.xcframework](#framework-not-found-iproovxcframework)
- [Framework not found DatadogCore.xcframework](#framework-not-found-datadogcorexcframework)
- [Support](#support)

## Compatibility
Expand All @@ -36,7 +37,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.7.1
cordova plugin add https://github.com/Jumio/mobile-cordova.git#v4.9.0
cd platforms/ios && pod install
```

Expand All @@ -45,7 +46,16 @@ cd platforms/ios && pod install
### 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/master#basics)

#### NFC

Check out the [NFC setup guide](https://github.com/Jumio/mobile-sdk-ios/blob/master/docs/integration_guide.md#nfc-setup).

#### Digital Identity

Check out the [Digital Identity setup guide](https://github.com/Jumio/mobile-sdk-ios/blob/master/docs/integration_guide.md#digital-identity-setup).

#### Device Risk

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

### Android
Expand Down Expand Up @@ -91,8 +101,10 @@ You can pass the following customization options at [`Jumio.start`](demo/www/js/

| Customization key |
|:------------------------------------------------|
| iProovAnimationForeground |
| iProovAnimationBackground |
| facePrimary |
| faceSecondary |
| faceOutline |
| faceAnimationForeground |
| iProovFilterForegroundColor |
| iProovFilterBackgroundColor |
| iProovTitleTextColor |
Expand All @@ -107,17 +119,22 @@ You can pass the following customization options at [`Jumio.start`](demo/www/js/
| primaryButtonBackground |
| primaryButtonBackgroundPressed |
| primaryButtonBackgroundDisabled |
| primaryButtonText |
| primaryButtonForeground |
| primaryButtonForegroundPressed |
| primaryButtonForegroundDisabled |
| primaryButtonOutline |
| secondaryButtonBackground |
| secondaryButtonBackgroundPressed |
| secondaryButtonBackgroundDisabled |
| secondaryButtonText |
| secondaryButtonForeground |
| secondaryButtonForegroundPressed |
| secondaryButtonForegroundDisabled |
| secondaryButtonOutline |
| bubbleBackground |
| bubbleForeground |
| bubbleBackgroundSelected |
| bubbleCircleItemForeground |
| bubbleCircleItemBackground |
| bubbleSelectionIconForeground |
| loadingCirclePlain |
| loadingCircleGradientStart |
| loadingCircleGradientEnd |
Expand All @@ -136,18 +153,22 @@ You can pass the following customization options at [`Jumio.start`](demo/www/js/
| scanViewBubbleForeground |
| scanViewBubbleBackground |
| scanViewForeground |
| scanViewAnimationShutter |
| scanViewDocumentShutter |
| scanViewFaceShutter |
| searchBubbleBackground |
| searchBubbleForeground |
| searchBubbleListItemSelected |
| 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.

Expand Down Expand Up @@ -180,28 +201,29 @@ JumioSDK will return a JSONObject `documentData` with all extracted data in cas

### Result

| Parameter | Type | Max. length | Description |
|:---------------------|:---------|:------------|:-----------------------------------------------------------------------------------------------------------|
| selectedCountry | String | 3 | [ISO 3166-1 alpha-3](http://en.wikipedia.org/wiki/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](https://en.wikipedia.org/wiki/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](https://en.wikipedia.org/wiki/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](http://en.wikipedia.org/wiki/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 |
| Parameter | Type | Max. length | Description |
|:------------------------|:---------|:------------|:-----------------------------------------------------------------------------------------------------------|
| selectedCountry | String | 3 | [ISO 3166-1 alpha-3](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code as provided or selected |
| selectedDocumentType | String | 16 | PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA |
| selectedDocumentSubType | String | | Sub type of the scanned ID |
| 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](https://en.wikipedia.org/wiki/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](https://en.wikipedia.org/wiki/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](http://en.wikipedia.org/wiki/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*

Expand Down Expand Up @@ -283,6 +305,20 @@ post_install do |installer|
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](https://github.com/Jumio/mobile-sdk-ios#certified-liveness-vendor).

# Support
Expand Down
24 changes: 14 additions & 10 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@ Demonstrates how to use the JumioMobileSDK plugin.
## Prerequisites

* Cordova CLI 12.0.0
* NodeJS 20.5.1
* NodeJS 21.6.2

## Usage
## Hooks

### iOS specific hook

To build and run the iOS app, you need to add a hook in the `config.xml` iOS platform, which extends the generated Podfile. This script is located in the `scripts` folder, called `podEdit.js`, along with the extension, `podExtension`, that is copied to the Podfile.

### Android specific hook

Add your data center in `www/js/index.js` and run the following commands:
Currently Cordova Android doesn't support API 34, breaking the run application command for Android. To remedy this, we need the add a `after_platform_add` hook in the `config.xml` Android platform section, to modify the Java version of the build gradle. This script is located in the `scripts` folder, called `buildGradleEdit.js`.

## Usage
```
cordova plugin add --link ../
cordova prepare
cd platforms/ios && pod install
cordova platform add android && cordova prepare android
cordova platform add ios && cordova prepare ios && cd platforms/ios && pod install
```

### iOS-specific

To build and run the iOS app, you need to add two hooks in the `config.xml`, which extends the generated Podfile. We use the same script for both hooks, and it's located in the `scripts` folder, called `podEdit.js`, along with the extension, `podExtension`, that is copied to the Podfile.
**_DISCLAIMER:_** The 'add platform' and 'prepare' commands need to be called separately due to cordova limitations.

## Run the application
```
cordova run android
# OR
cordova run ios
```
```
16 changes: 9 additions & 7 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="4.7.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.jumio.cordova.demo" version="4.9.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 All @@ -15,8 +15,8 @@
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<hook type="after_prepare" src="scripts/podEdit.js" />
<platform name="android">
<hook type="after_platform_add" src="scripts/buildGradleEdit.js" />
<allow-intent href="market:*" />
<edit-config file="AndroidManifest.xml" mode="merge" parent="/*" target="/manifest/" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand All @@ -43,11 +43,11 @@
</edit-config>
</platform>
<platform name="ios">
<hook type="after_prepare" src="scripts/podEdit.js" />
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<preference name="deployment-target" value="11.0" />
<preference name="deployment-target" value="12.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>
Expand All @@ -72,8 +72,10 @@
<preference name="AndroidXEnabled" value="true" />
<preference name="GradlePluginKotlinEnabled" value="false" />
<preference name="GradlePluginKotlinCodeStyle" value="official" />
<preference name="GradlePluginKotlinVersion" value="1.8.0" />
<preference name="GradlePluginKotlinVersion" value="1.9.10" />
<preference name="GradleVersion" value="8.0" />
<preference name="AndroidGradlePluginVersion" value="8.1.3" />
<preference name="android-minSdkVersion" value="21" />
<preference name="android-maxSdkVersion" value="33" />
<preference name="android-targetSdkVersion" value="33" />
<preference name="android-maxSdkVersion" value="34" />
<preference name="android-targetSdkVersion" value="34" />
</widget>
Loading

0 comments on commit f6fab98

Please sign in to comment.