Skip to content

Commit

Permalink
Final commit for 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JumioMobileTeam committed Nov 7, 2017
1 parent dd4fb58 commit 7bc1ea3
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 51 deletions.
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,22 @@ demo/platforms/ios/DemoApp.xcodeproj/xcuserdata
demo/platforms/ios/DemoApp.xcodeproj/project.xcworkspace
demo/platforms/ios/Pods
demo/platforms/ios/Podfile.lock
demo/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata
demo/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/dictionaries
.idea/libraries
*.iml
42 changes: 29 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
Official Jumio Mobile SDK plugin for Apache Cordova

## Compatibility
With every release, we only ensure compatibility with the latest version of Cordova.
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: 7.1.0
* Cordova Android: 6.3.0
* Cordova iOS: 4.5.3

## Setup

Expand All @@ -13,14 +17,14 @@ 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#v2.8.0
cordova plugin add https://github.com/Jumio/mobile-cordova.git#v2.9.0
```

## 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/v2.8.0#basic-setup)
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/v2.9.0#basic-setup)

### Android

Expand All @@ -29,24 +33,34 @@ Add the Jumio repository:
```
repositories {
maven { url 'http://mobile-sdk.jumio.com' }
maven { url 'https://maven.google.com/' }
}
```

Add a parameter for your SDK_VERSION into the ext-section:

```
ext {
SDK_VERSION = "2.8.0"
SDK_VERSION = "2.9.0"
}
```

Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.8.0/README.md#permissions)
Add required permissions for the products as described in chapter [Permissions](https://github.com/Jumio/mobile-sdk-android/blob/v2.9.0/README.md#permissions)

Open the android project of your cordova project located in */platforms/android* and insert the dependencies from the products you require to your **build.gradle** file. (Module: android)

* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.8.0/docs/integration_netverify-fastfill.md#dependencies)
* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.8.0/docs/integration_document-verification.md#dependencies)
* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.8.0/docs/integration_bam-checkout.md#dependencies)
* [Netverify & Fastfill](https://github.com/Jumio/mobile-sdk-android/blob/v2.9.0/docs/integration_netverify-fastfill.md#dependencies)
* [Document Verification](https://github.com/Jumio/mobile-sdk-android/blob/v2.9.0/docs/integration_document-verification.md#dependencies)
* [BAM Checkout](https://github.com/Jumio/mobile-sdk-android/blob/v2.9.0/docs/integration_bam-checkout.md#dependencies)

__Note:__ If you are using Netverify, make sure to add the Google vision meta-data to you **AndroidManifest.xml** accordingly:

```
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode, face"
tools:replace="android:value"/>
```

## Usage

Expand Down Expand Up @@ -279,7 +293,7 @@ Jumio.startBAM(function(cardInformation) {
## Customization

### Android
The Netverify SDK can be customized to the respective needs by following this [customization chapter](https://github.com/Jumio/mobile-sdk-android/blob/v2.8.0/docs/integration_netverify-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/v2.9.0/docs/integration_netverify-fastfill.md#customization).

### iOS
The SDK can be customized to the respective needs. You can pass the following customization options to the initializer:
Expand All @@ -292,10 +306,12 @@ The SDK can be customized to the respective needs. You can pass the following cu
| tintColor | STRING | Change the tint color of the navigation bar |
| barTintColor | STRING | Change the bar tint color of the navigation bar |
| textTitleColor | STRING | Change the text title color of the navigation bar |
| defaultButtonBackgroundColor | STRING | Change the background color of the default button |
| defaultButtonTitleColor | STRING | Change the title color of the default button |
| activeButtonBackgroundColor | STRING | Change the background color of the active button |
| activeButtonTitleColor | STRING | Change the title color of the active button |
| documentSelectionHeaderBackgroundColor | STRING | Change the background color of the document selection header |
| documentSelectionHeaderTitleColor | STRING | Change the title color of the document selection header |
| documentSelectionHeaderIconColor | STRING | Change the icon color of the document selection header |
| documentSelectionButtonBackgroundColor | STRING | Change the background color of the document selection button |
| documentSelectionButtonTitleColor | STRING | Change the title color of the document selection button |
| documentSelectionButtonIconColor | STRING | Change the icon color of the document selection button |
| fallbackButtonBackgroundColor | STRING | Change the background color of the fallback button |
| fallbackButtonBorderColor | STRING | Change the border color of the fallback button |
| fallbackButtonTitleColor | STRING | Change the title color of the fallback button |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-jumio-mobilesdk",
"version": "2.8.0",
"version": "2.9.0",
"description": "Jumio Mobile SDK Plugin for Cordova",
"cordova": {
"id": "cordova-plugin-jumio-mobilesdk",
Expand Down
34 changes: 21 additions & 13 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-jumio-mobilesdk" version="2.8.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="cordova-plugin-jumio-mobilesdk" version="2.9.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>JumioMobileSDK</name>
<js-module name="JumioMobileSDK" src="www/JumioMobileSDK.js">
<clobbers target="Jumio" />
Expand All @@ -21,11 +21,11 @@
<string>$CAMERA_USAGE_DESCRIPTION</string>
</config-file>

<pods-config ios-min-version="8.0" use-frameworks="true">
<pods-config ios-min-version="9.0" use-frameworks="true">
<source url="https://github.com/CocoaPods/Specs.git" />
<source url="http://mobile-sdk.jumio.com/distribution.git" />
</pods-config>
<pod name="JumioMobileSDK-FAT" version="2.8.0" configurations="release,debug" />
<pod name="JumioMobileSDK-FAT" version="2.9.0" configurations="release,debug" />
</platform>

<platform name="android">
Expand Down Expand Up @@ -63,16 +63,24 @@
</config-file>
<proguard-config>
-keep class com.jumio.** { *; }
-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}
-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
-keep class org.spongycastle.** {*;}
-keep class org.ejbca.** {*;}

-dontwarn java.nio.**
-dontwarn org.codehaus.**
-dontwarn org.ejbca.**
-dontwarn org.spongycastle.**
-keep class jumio.** { *; }
-keep class com.samsung.** { *; }
-keep class com.samsung.**$* { *; }
-keep class com.microblink.** { *; }
-keep class com.microblink.**$* { *; }

-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}
-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
-keep class org.spongycastle.** {*;}
-keep class org.ejbca.** {*;}

-dontwarn java.nio.**
-dontwarn org.codehaus.**
-dontwarn org.ejbca.**
-dontwarn org.spongycastle.**
-dontwarn com.samsung.**
-dontwarn com.microblink.**
</proguard-config>
<source-file src="src/android/JumioMobileSDK.java" target-dir="src/com/jumio/mobilesdk" />
</platform>
Expand Down
2 changes: 1 addition & 1 deletion src/android/JumioMobileSDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private void initDocumentVerification(JSONArray data) {
documentVerificationSDK.setDocumentName(options.getString(key));
} else if (key.equals("cameraPosition")) {
JumioCameraPosition cameraPosition = (options.getString(key).toLowerCase().equals("front")) ? JumioCameraPosition.FRONT : JumioCameraPosition.BACK;
bamSDK.setCameraPosition(cameraPosition);
documentVerificationSDK.setCameraPosition(cameraPosition);
}
}
}
Expand Down
36 changes: 14 additions & 22 deletions src/ios/JumioMobileSDK.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ - (void)initNetverify:(CDVInvokedUrlCommand*)command
}

self.netverifyConfiguration.preselectedDocumentTypes = documentTypes;
} else if ([key isEqualToString: @"offlineToken"]) {
self.netverifyConfiguration.offlineToken = [options objectForKey: key];
}
}
}
Expand All @@ -244,14 +246,18 @@ - (void)initNetverify:(CDVInvokedUrlCommand*)command
[[UINavigationBar netverifyAppearance] setTitleTextAttributes: @{NSForegroundColorAttributeName: color}];
} else if ([key isEqualToString: @"foregroundColor"]) {
[[NetverifyBaseView netverifyAppearance] setForegroundColor: color];
} else if ([key isEqualToString: @"defaultButtonBackgroundColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setBackgroundColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"defaultButtonTitleColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setTitleColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"activeButtonBackgroundColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setBackgroundColor: color forState:UIControlStateHighlighted];
} else if ([key isEqualToString: @"activeButtonTitleColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setTitleColor: color forState:UIControlStateHighlighted];
} else if ([key isEqualToString: @"documentSelectionHeaderBackgroundColor"]) {
[[NetverifyDocumentSelectionHeaderView netverifyAppearance] setBackgroundColor: color];
} else if ([key isEqualToString: @"documentSelectionHeaderTitleColor"]) {
[[NetverifyDocumentSelectionHeaderView netverifyAppearance] setTitleColor: color];
} else if ([key isEqualToString: @"documentSelectionHeaderIconColor"]) {
[[NetverifyDocumentSelectionHeaderView netverifyAppearance] setIconColor: color];
} else if ([key isEqualToString: @"documentSelectionButtonBackgroundColor"]) {
[[NetverifyDocumentSelectionButton netverifyAppearance] setBackgroundColor: color forState: UIControlStateNormal];
} else if ([key isEqualToString: @"documentSelectionButtonTitleColor"]) {
[[NetverifyDocumentSelectionButton netverifyAppearance] setTitleColor: color forState: UIControlStateNormal];
} else if ([key isEqualToString: @"documentSelectionButtonIconColor"]) {
[[NetverifyDocumentSelectionButton netverifyAppearance] setIconColor: color forState: UIControlStateNormal];
} else if ([key isEqualToString: @"fallbackButtonBackgroundColor"]) {
[[NetverifyFallbackButton netverifyAppearance] setBackgroundColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"fallbackButtonBorderColor"]) {
Expand Down Expand Up @@ -367,20 +373,6 @@ - (void)initDocumentVerification:(CDVInvokedUrlCommand*)command
[[UINavigationBar netverifyAppearance] setTitleTextAttributes: @{NSForegroundColorAttributeName: color}];
} else if ([key isEqualToString: @"foregroundColor"]) {
[[NetverifyBaseView netverifyAppearance] setForegroundColor: color];
} else if ([key isEqualToString: @"defaultButtonBackgroundColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setBackgroundColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"defaultButtonTitleColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setTitleColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"activeButtonBackgroundColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setBackgroundColor: color forState:UIControlStateHighlighted];
} else if ([key isEqualToString: @"activeButtonTitleColor"]) {
[[NetverifyScanOptionButton netverifyAppearance] setTitleColor: color forState:UIControlStateHighlighted];
} else if ([key isEqualToString: @"fallbackButtonBackgroundColor"]) {
[[NetverifyFallbackButton netverifyAppearance] setBackgroundColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"fallbackButtonBorderColor"]) {
[[NetverifyFallbackButton netverifyAppearance] setBorderColor: color];
} else if ([key isEqualToString: @"fallbackButtonTitleColor"]) {
[[NetverifyFallbackButton netverifyAppearance] setTitleColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"positiveButtonBackgroundColor"]) {
[[NetverifyPositiveButton netverifyAppearance] setBackgroundColor: color forState:UIControlStateNormal];
} else if ([key isEqualToString: @"positiveButtonBorderColor"]) {
Expand Down

0 comments on commit 7bc1ea3

Please sign in to comment.