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 18, 2024
1 parent 1f9fd9a commit 194ee39
Show file tree
Hide file tree
Showing 66 changed files with 409 additions and 8,273 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.9.0
* Updated Jumio SDK Android and iOS to 4.9.0
* Update dependencies to Flutter 3.19.1 and Dart 3.3.0

## 4.7.1
* Updated Jumio SDK Android to 4.7.1

Expand Down
107 changes: 62 additions & 45 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 Flutter

This plugin is compatible with version 4.7.0 of the Jumio iOS SDK and 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 @@ -19,6 +19,7 @@ If you have questions, please reach out to your Account Manager or contact [Jumi
- [Callbacks](#callbacks)
- [Result Objects](#result-objects)
- [FAQ](#faq)
- [Face help animation breaks on Android](#face-help-animation-breaks-on-android)
- [iOS Runs on Debug, Crashes on Release Build](#ios-runs-on-debug-crashes-on-release-build)
- [App Crash at Launch for iOS](#app-crash-at-launch-for-ios)
- [iOS Localization](#ios-localization)
Expand All @@ -27,7 +28,7 @@ If you have questions, please reach out to your Account Manager or contact [Jumi
- [Support](#support)

## Compatibility
Compatibility has been tested with a Flutter version of 3.13.6 and Dart 3.1.3
Compatibility has been tested with a Flutter version of 3.19.1 and Dart 3.4.0

## Setup
Create Flutter project and add the Jumio Mobile SDK module to it.
Expand All @@ -43,7 +44,7 @@ dependencies:
flutter:
sdk: flutter

jumio_mobile_sdk_flutter: ^4.7.1
jumio_mobile_sdk_flutter: ^4.9.0
```

And install the dependency:
Expand All @@ -61,7 +62,16 @@ cd ios && pod install
1. Add the "**NSCameraUsageDescription**"-key to your Info.plist file.
2. Your app's deployment target must be at least iOS 11.0

#### 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 @@ -163,8 +173,10 @@ You can pass the following customization options at [`Jumio.start`](example/lib/

| Customization key |
|:------------------------------------------------|
| iProovAnimationForeground |
| iProovAnimationBackground |
| facePrimary |
| faceSecondary |
| faceOutline |
| faceAnimationForeground |
| iProovFilterForegroundColor |
| iProovFilterBackgroundColor |
| iProovTitleTextColor |
Expand All @@ -179,17 +191,22 @@ You can pass the following customization options at [`Jumio.start`](example/lib/
| 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 @@ -208,18 +225,22 @@ You can pass the following customization options at [`Jumio.start`](example/lib/
| 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 @@ -252,28 +273,29 @@ JumioSDK will return `EventResult` in case of a successfully completed workflow

### EventResult

| 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 | | 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 @@ -305,6 +327,12 @@ You need to copy those files to the assets folder of your Android project (Path:

## FAQ

### Face help animation breaks on Android
If face help animation looks as expected in debug builds, but breaks in release builds, please make sure to include the following rule in your [**Proguard** file](example/android/app/proguard-rules.pro):
```
-keep class androidx.constraintlayout.motion.widget.** { *; }
```

### iOS Simulator shows a white-screen, when the Jumio SDK is started
The Jumio SDK does not support the iOS Simulator. Please run the Jumio SDK only on physical devices.

Expand Down Expand Up @@ -352,23 +380,12 @@ Please refer to [iOS guide](https://github.com/Jumio/mobile-sdk-ios#via-cocoapod

### iOS Localization
After installing Cocoapods, please localize your iOS application using the languages provided at the following path:
`ios -> Pods -> Jumio -> Localizations -> xx.lproj`
`ios -> Pods -> Jumio -> Localization -> xx.lproj`

![Localization](images/Flutter_localization.gif)

### iProov String Keys
Please note that as of 3.8.0. the following keys have been added to the SDK:

* `"IProov_IntroFlash"`
* `"IProov_IntroLa"`
* `"IProov_PromptLivenessAlignFace"`
* `"IProov_PromptLivenessNoTarget"`
* `"IProov_PromptLivenessScanCompleted"`
* `"IProov_PromptTooClose"`
* `"IProov_PromptTooFar"`

Make sure your `podfile` is up to date and that new pod versions are installed properly so your `Localizable` files include new strings.
For more information, please refer to our [Changelog](https://github.com/Jumio/mobile-sdk-ios/blob/master/docs/changelog) and [Transition Guide](https://github.com/Jumio/mobile-sdk-ios/blob/master/docs/transition-guide_id-verification-fastfill.md#3.8.0).
For more information, please refer to our [Changelog](https://github.com/Jumio/mobile-sdk-ios/blob/master/docs/changelog) and [Transition Guide](https://github.com/Jumio/mobile-sdk-ios/blob/master/docs/transition_guide.md).

### Empty Country List for Android Release Build
If country list is empty for the Android release build, please make sure your app has the proper internet permissions. Without a working network connection, countries won't load in and the list will stay empty.
Expand Down
10 changes: 5 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ group 'com.jumio.jumiomobilesdk'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.8.0'
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -36,7 +36,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 33
compileSdk 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -51,7 +51,7 @@ android {
}

ext {
SDK_VERSION = "4.7.1"
SDK_VERSION = "4.9.0"
}

dependencies {
Expand All @@ -67,7 +67,7 @@ dependencies {
implementation "com.jumio.android:liveness:${SDK_VERSION}"

//only for the sample code
implementation "androidx.activity:activity-ktx:1.7.2"
implementation "androidx.activity:activity-ktx:1.8.2"

//Kotlin
implementation "androidx.multidex:multidex:2.0.1"
Expand Down
1 change: 0 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class JumioModule : ModuleBase() {
mapOf(
"selectedCountry" to idResult.country,
"selectedDocumentType" to idResult.idType,
"selectedDocumentSubType" to idResult.idSubType,
"idNumber" to idResult.documentNumber,
"personalNumber" to idResult.personalNumber,
"issuingDate" to idResult.issuingDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ fun <K, V> Map<K, V?>.compact(): Map<K, V> = filter { it.value != null }.mapValu
* to their lowercase counterparts. If two keys become equal in this way, the latter one's
* associated value will be retained.
*/
fun <V> Map<String, V>.withLowercaseKeys() = mapKeys { it.key.toLowerCase(Locale.ROOT) }
fun <V> Map<String, V>.withLowercaseKeys() = mapKeys { it.key.lowercase(Locale.ROOT) }
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ samples, guidance on mobile development, and a full API reference.
## Usage
Adjust your data center in the **credentials.dart** file, open a bash and run the following commands:
```
cd MyProject
cd my_project
flutter pub get
cd ios && pod install
```
Expand Down
33 changes: 21 additions & 12 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,12 +22,8 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdk 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -37,10 +34,10 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.jumio.jumiomobilesdk_example"
namespace "com.jumio.jumiomobilesdk_example"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Expand All @@ -54,12 +51,24 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
}

flutter {
source '../..'
}

dependencies {
def kotlin_version = '1.9.10'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

0 comments on commit 194ee39

Please sign in to comment.