@getyoti/yoti-doc-scan-react-native 2.0.2 → 3.0.1

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 4+](https://github.com/getyoti/yoti-doc-scan-ios/releases)
14
+ - [iOS SDK 5+](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": "^2.0.2"
20
+ "@getyoti/yoti-doc-scan-react-native": "^3.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.2.0"
29
+ yotiSdkVersion = "3.4.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:
@@ -70,6 +75,8 @@ target 'TargetName' do
70
75
  use_react_native!(:path => config[:reactNativePath])
71
76
  use_frameworks!
72
77
  use_native_modules!
78
+ pod 'YotiDocumentScan' // Include if `YotiSDKIdentityDocument` is included and to support identity document OCR
79
+ pod 'YotiNFC' // Include if `YotiSDKIdentityDocument` is included and to support identity document NFC
73
80
  pod 'YotiSDKIdentityDocument' // Optional
74
81
  pod 'YotiSDKSupplementaryDocument' // Optional
75
82
  pod 'YotiSDKFaceTec' // Optional
@@ -78,7 +85,7 @@ end
78
85
  ```
79
86
  In addition, you should add [`NSCameraUsageDescription`](https://developer.apple.com/documentation/bundleresources/information_property_list/nscamerausagedescription) to your `Info.plist`.
80
87
 
81
- And if you have included `YotiSDKIdentityDocument` in your target, make sure to also:
88
+ And if you have included `YotiNFC` in your target, make sure to also:
82
89
  - Add [`NFCReaderUsageDescription`](https://developer.apple.com/documentation/bundleresources/information_property_list/nfcreaderusagedescription) to your `Info.plist`
83
90
  - Add [`com.apple.developer.nfc.readersession.iso7816.select-identifiers`](https://developer.apple.com/documentation/bundleresources/information_property_list/select-identifiers) to your `Info.plist` and include [`A0000002471001`](https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf) as an application identifier for your app to support
84
91
  - Turn on [`Near Field Communication Tag Reading`](https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_app) under the Signing & Capabilities tab for your project’s target
@@ -103,7 +110,7 @@ RNYotiDocScan.startSession(id, token, successCallback, errorCallback);
103
110
  ### 3. Customizations
104
111
  On iOS, you can set the primary color using the following API:
105
112
  ```javascript
106
- RNYotiDocScan.setPrimaryColorRGB(0, 0, 0); // default: (34, 157, 255)
113
+ RNYotiDocScan.setPrimaryColorRGB(0, 0, 0); // default: (40, 117, 188)
107
114
  ```
108
115
  To customize the colors on Android, please refer to its separate [documentation](https://github.com/getyoti/yoti-doc-scan-android#colours).
109
116
 
@@ -134,11 +141,12 @@ Code | Description
134
141
  2000 | Unauthorised request (wrong or expired session token)
135
142
  2001 | Session not found
136
143
  2002 | Session expired
137
- 2003 | SDK launched without session Token
138
- 2004 | SDK launched without session ID
144
+ 2003 | SDK launched without a session token
145
+ 2004 | SDK launched without a session id
139
146
  3000 | Yoti's services are down or unable to process the request
140
147
  3001 | An error occurred during a network request
141
148
  3002 | The user did not have a network connection
149
+ 3003 | A network request timed out
142
150
  4000 | The user did not grant permission to the camera
143
151
  4001 | The user submitted a wrong document
144
152
  5000 | The user's camera was not found and file upload is not allowed
@@ -5,14 +5,13 @@ def safeExtGet(prop, fallback) {
5
5
  }
6
6
 
7
7
  android {
8
- compileSdkVersion safeExtGet('compileSdkVersion', 29)
9
- buildToolsVersion safeExtGet('buildToolsVersion', '29.0.3')
8
+ compileSdk safeExtGet('compileSdkVersion', 33)
10
9
 
11
10
  defaultConfig {
12
11
  minSdkVersion safeExtGet('minSdkVersion', 21)
13
- targetSdkVersion safeExtGet('targetSdkVersion', 29)
14
- versionCode 206
15
- versionName "2.0.2"
12
+ targetSdkVersion safeExtGet('targetSdkVersion', 33)
13
+ versionCode 301
14
+ versionName "3.0.1"
16
15
  ndk {
17
16
  abiFilters "armeabi-v7a", "x86"
18
17
  }
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
@@ -1,7 +1,5 @@
1
1
  #import "RNYotiDocScan.h"
2
2
  #import <React/RCTUtils.h>
3
- #import <YotiSDKNetwork/YotiSDKNetwork-Swift.h>
4
- #import <YotiSDKCommon/YotiSDKCommon-Swift.h>
5
3
  #import <YotiSDKCore/YotiSDKCore-Swift.h>
6
4
  #if __has_include(<YotiSDKIdentityDocument/YotiSDKIdentityDocument-Swift.h>)
7
5
  #import <YotiSDKIdentityDocument/YotiSDKIdentityDocument-Swift.h>
@@ -104,7 +102,7 @@ RCT_EXPORT_METHOD(startSession:(NSString *)sessionId clientSessionToken:(NSStrin
104
102
  if (_primaryColor != nil) {
105
103
  return _primaryColor;
106
104
  } else {
107
- return [UIColor colorWithRed:34.0/255.0 green:157.0/255.0 blue:255.0/255.0 alpha:1.0];
105
+ return [UIColor colorWithRed:40.0/255.0 green:117.0/255.0 blue:188.0/255.0 alpha:1.0];
108
106
  }
109
107
  }
110
108
 
@@ -3,7 +3,7 @@
3
3
  archiveVersion = 1;
4
4
  classes = {
5
5
  };
6
- objectVersion = 53;
6
+ objectVersion = 54;
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
@@ -148,7 +148,7 @@
148
148
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
149
149
  GCC_WARN_UNUSED_FUNCTION = YES;
150
150
  GCC_WARN_UNUSED_VARIABLE = YES;
151
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
151
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
152
152
  MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
153
153
  MTL_FAST_MATH = YES;
154
154
  ONLY_ACTIVE_ARCH = YES;
@@ -201,7 +201,7 @@
201
201
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
202
202
  GCC_WARN_UNUSED_FUNCTION = YES;
203
203
  GCC_WARN_UNUSED_VARIABLE = YES;
204
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
204
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
205
205
  MTL_ENABLE_DEBUG_INFO = NO;
206
206
  MTL_FAST_MATH = YES;
207
207
  SDKROOT = iphoneos;
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": "2.0.2",
8
+ "version": "3.0.1",
9
9
  "devDependencies": {
10
10
  "react": "^17.0.2",
11
11
  "react-dom": "^17.0.2",
@@ -23,7 +23,5 @@ Pod::Spec.new do |spec|
23
23
  spec.source_files = "ios/**/*.{h,m}"
24
24
  spec.platform = :ios, "11.0"
25
25
  spec.dependency "React"
26
- spec.dependency "YotiSDKNetwork"
27
- spec.dependency "YotiSDKCommon"
28
26
  spec.dependency "YotiSDKCore"
29
27
  end