@getyoti/yoti-doc-scan-react-native 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,13 +11,13 @@ To integrate with Yoti IDV, a working infrastructure is needed (see [developers.
11
11
 
12
12
  ## Requirements
13
13
  - [Android SDK 3+](https://github.com/getyoti/yoti-doc-scan-android/releases)
14
- - [iOS SDK 5+](https://github.com/getyoti/yoti-doc-scan-ios/releases)
14
+ - [iOS SDK 6+](https://github.com/getyoti/yoti-doc-scan-ios/releases)
15
15
 
16
16
  ## Integration
17
17
  Start your integration by adding the following dependency to your `package.json` file:
18
18
  ```json
19
19
  "dependencies": {
20
- "@getyoti/yoti-doc-scan-react-native": "^3.0.0"
20
+ "@getyoti/yoti-doc-scan-react-native": "^4.0.0"
21
21
  }
22
22
  ```
23
23
 
@@ -26,7 +26,7 @@ Continuing with your integration for Android, add the following property and rep
26
26
  ```groovy
27
27
  buildscript {
28
28
  ext {
29
- yotiSdkVersion = "3.3.0"
29
+ yotiSdkVersion = "3.5.0"
30
30
  }
31
31
  }
32
32
  allprojects {
@@ -40,11 +40,16 @@ allprojects {
40
40
  Now add any of these optional dependencies to your app's [`build.gradle`](https://developer.android.com/build#build-files) file:
41
41
  ```groovy
42
42
  dependencies {
43
+ // With automatic capture via OCR and NFC capture
43
44
  implementation "com.yoti.mobile.android.sdk:yoti-sdk-doc-scan:${rootProject.ext.yotiSdkVersion}"
45
+ // With manual capture only, no OCR, no NFC - around 14Mb smaller in size
46
+ implementation "com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-slim:${rootProject.ext.yotiSdkVersion}"
44
47
  implementation "com.yoti.mobile.android.sdk:yoti-sdk-doc-scan-sup:${rootProject.ext.yotiSdkVersion}"
45
48
  implementation "com.yoti.mobile.android.sdk:yoti-sdk-liveness-zoom:${rootProject.ext.yotiSdkVersion}"
46
- implementation "com.yoti.mobile.android.sdk:yoti-sdk-facecapture:${rootProject.ext.yotiSdkVersion}" // With embedded AI model
47
- implementation "com.yoti.mobile.android.sdk:yoti-sdk-facecapture-unbundled:${rootProject.ext.yotiSdkVersion}" // Without embedded AI model - around 20 MB smaller in size
49
+ // With embedded AI model
50
+ implementation "com.yoti.mobile.android.sdk:yoti-sdk-facecapture:${rootProject.ext.yotiSdkVersion}"
51
+ // Without embedded AI model - around 20 MB smaller in size
52
+ implementation "com.yoti.mobile.android.sdk:yoti-sdk-facecapture-unbundled:${rootProject.ext.yotiSdkVersion}"
48
53
  }
49
54
  ```
50
55
  If you're using Proguard or another obfuscation tool, you should also add the following configuration rules to your `proguard-rules.pro` file:
@@ -103,9 +108,10 @@ RNYotiDocScan.startSession(id, token, successCallback, errorCallback);
103
108
  ```
104
109
 
105
110
  ### 3. Customizations
106
- On iOS, you can set the primary color using the following API:
111
+ On iOS, you can set the primary colors using the following API:
107
112
  ```javascript
108
- RNYotiDocScan.setPrimaryColorRGB(0, 0, 0); // default: (34, 157, 255)
113
+ RNYotiDocScan.setLightPrimaryColorRGB(0, 0, 0); // default: (40, 117, 188)
114
+ RNYotiDocScan.setDarkPrimaryColorRGB(0, 0, 0); // default: (145, 190, 255)
109
115
  ```
110
116
  To customize the colors on Android, please refer to its separate [documentation](https://github.com/getyoti/yoti-doc-scan-android#colours).
111
117
 
@@ -10,8 +10,8 @@ android {
10
10
  defaultConfig {
11
11
  minSdkVersion safeExtGet('minSdkVersion', 21)
12
12
  targetSdkVersion safeExtGet('targetSdkVersion', 33)
13
- versionCode 300
14
- versionName "3.0.0"
13
+ versionCode 400
14
+ versionName "4.0.0"
15
15
  ndk {
16
16
  abiFilters "armeabi-v7a", "x86"
17
17
  }
@@ -51,7 +51,12 @@ public class RNYotiDocScanModule extends ReactContextBaseJavaModule {
51
51
  }
52
52
 
53
53
  @ReactMethod
54
- public void setPrimaryColorRGB(double red, double green, double blue) {
54
+ public void setLightPrimaryColorRGB(double red, double green, double blue) {
55
+ // Required to maintain cross-platform API compatibility.
56
+ }
57
+
58
+ @ReactMethod
59
+ public void setDarkPrimaryColorRGB(double red, double green, double blue) {
55
60
  // Required to maintain cross-platform API compatibility.
56
61
  }
57
62
 
@@ -23,7 +23,8 @@ NSInteger const kYotiSuccessStatusCode = 0;
23
23
  @property (nonatomic, strong) NSString *sessionID;
24
24
  @property (nonatomic, strong) NSString *sessionToken;
25
25
  @property (nonatomic, assign) BOOL setUpCanadaServerLocation;
26
- @property (nonatomic, strong) UIColor *primaryColor;
26
+ @property (nonatomic, strong) UIColor *lightPrimaryColor;
27
+ @property (nonatomic, strong) UIColor *darkPrimaryColor;
27
28
  @property (nonatomic, strong) RCTResponseSenderBlock errorCallback;
28
29
  @property (nonatomic, strong) RCTResponseSenderBlock successCallback;
29
30
  @end
@@ -36,8 +37,12 @@ RCT_EXPORT_METHOD(useCanadaService) {
36
37
  _setUpCanadaServerLocation = YES;
37
38
  }
38
39
 
39
- RCT_EXPORT_METHOD(setPrimaryColorRGB:(double)red green:(double)green blue:(double)blue) {
40
- _primaryColor = [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:1.0];
40
+ RCT_EXPORT_METHOD(setLightPrimaryColorRGB:(double)red green:(double)green blue:(double)blue) {
41
+ _lightPrimaryColor = [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:1.0];
42
+ }
43
+
44
+ RCT_EXPORT_METHOD(setDarkPrimaryColorRGB:(double)red green:(double)green blue:(double)blue) {
45
+ _darkPrimaryColor = [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:1.0];
41
46
  }
42
47
 
43
48
  RCT_EXPORT_METHOD(setRequestCode:(NSNumber * _Nonnull)requestCode) {
@@ -98,11 +103,19 @@ RCT_EXPORT_METHOD(startSession:(NSString *)sessionId clientSessionToken:(NSStrin
98
103
  }
99
104
 
100
105
  // MARK: - YotiSDKDelegate
101
- - (UIColor * _Nonnull)primaryColorFor:(YotiSDKNavigationController * _Nonnull)navigationController {
102
- if (_primaryColor != nil) {
103
- return _primaryColor;
106
+ - (UIColor * _Nonnull)lightPrimaryColorFor:(YotiSDKNavigationController * _Nonnull)navigationController {
107
+ if (_lightPrimaryColor != nil) {
108
+ return _lightPrimaryColor;
109
+ } else {
110
+ return [UIColor colorWithRed:40.0/255.0 green:117.0/255.0 blue:188.0/255.0 alpha:1.0];
111
+ }
112
+ }
113
+
114
+ - (UIColor * _Nonnull)darkPrimaryColorFor:(YotiSDKNavigationController * _Nonnull)navigationController {
115
+ if (_darkPrimaryColor != nil) {
116
+ return _darkPrimaryColor;
104
117
  } else {
105
- return [UIColor colorWithRed:34.0/255.0 green:157.0/255.0 blue:255.0/255.0 alpha:1.0];
118
+ return [UIColor colorWithRed:145.0/255.0 green:190.0/255.0 blue:255.0/255.0 alpha:1.0];
106
119
  }
107
120
  }
108
121
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "license": "https://www.yoti.com/terms/identity-verification",
6
6
  "author": "Yoti Ltd",
7
7
  "main": "RNYotiDocScan.js",
8
- "version": "3.0.0",
8
+ "version": "4.0.0",
9
9
  "devDependencies": {
10
10
  "react": "^17.0.2",
11
11
  "react-dom": "^17.0.2",