Skip to content

Commit 14de622

Browse files
authored
Merge pull request #47 from getyoti/release/DEP-621-6.0.0
[Task] DEP-621: RN 6.0.0-alpha.1
2 parents 57d3d92 + a7bce60 commit 14de622

11 files changed

+505
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ For customization on Android, you can refer to the documentation outlined [here]
9898
RNYotiDocScan.setRequestCode(0); // default: 9001
9999
```
100100
101-
On iOS, the SDK expects launched sessions to contain multiple flows by default. To enable single-flow sessions, configure and include [yoti-doc-scan-react-native-configuration-ios.json](templates/yoti-doc-scan-react-native-configuration-ios.json) in your project’s target and then set the configuration as follows:
101+
On iOS, the SDK expects a launched session to contain multiple flows by default. To enable a single-flow session, configure and include [yoti-doc-scan-react-native-configuration-ios.json](templates/yoti-doc-scan-react-native-configuration-ios.json) in your project’s target and then set the configuration as follows:
102102
```javascript
103103
RNYotiDocScan.setConfiguration({
104104
bundle_identifier: "", // Optional: defaults to the main bundle identifier if not specified.

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
defaultConfig {
1313
minSdkVersion safeExtGet('minSdkVersion', 21)
1414
targetSdkVersion safeExtGet('targetSdkVersion', 34)
15-
versionCode 501
16-
versionName "5.0.1"
15+
versionCode 600
16+
versionName "6.0.0-alpha.1"
1717
ndk {
1818
abiFilters "armeabi-v7a", "x86"
1919
}

ios/Configuration.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ struct Configuration: Decodable {
88
let includeSupplementaryDocumentModuleType: Bool?
99
let includeFaceTecModuleType: Bool?
1010
let includeFaceCaptureModuleType: Bool?
11+
let disableIdentityDocumentCaptureEdgeDetection: Bool?
1112
let theme: Theme?
1213

1314
init(from decoder: Decoder) throws {
@@ -17,6 +18,7 @@ struct Configuration: Decodable {
1718
includeSupplementaryDocumentModuleType = try container.decodeIfPresent(Bool.self, forKey: .includeSupplementaryDocumentModuleType)
1819
includeFaceTecModuleType = try container.decodeIfPresent(Bool.self, forKey: .includeFaceTecModuleType)
1920
includeFaceCaptureModuleType = try container.decodeIfPresent(Bool.self, forKey: .includeFaceCaptureModuleType)
21+
disableIdentityDocumentCaptureEdgeDetection = try container.decodeIfPresent(Bool.self, forKey: .disableIdentityDocumentCaptureEdgeDetection)
2022
theme = try container.decodeIfPresent(Theme.self, forKey: .theme)
2123
}
2224

@@ -26,6 +28,7 @@ struct Configuration: Decodable {
2628
case includeSupplementaryDocumentModuleType = "include_supplementary_document_module_type"
2729
case includeFaceTecModuleType = "include_facetec_module_type"
2830
case includeFaceCaptureModuleType = "include_face_capture_module_type"
31+
case disableIdentityDocumentCaptureEdgeDetection = "disable_identity_document_capture_edge_detection"
2932
case theme
3033
}
3134
}

ios/RNYotiDocScan.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ extension RNYotiDocScan: YotiSDKDataSource, YotiSDKDelegate {
7171
sessionToken: sessionToken,
7272
singleFlow: _configuration?.singleFlow ?? false,
7373
moduleTypes: moduleTypes(),
74+
options: options(),
7475
theme: theme()
7576
)
7677
}
@@ -117,6 +118,14 @@ fileprivate extension RNYotiDocScan {
117118
return moduleTypes
118119
}
119120

121+
func options() -> [YotiSDKOption]? {
122+
if _configuration?.disableIdentityDocumentCaptureEdgeDetection == true {
123+
return [.disableIdentityDocumentCaptureEdgeDetection]
124+
} else {
125+
return nil
126+
}
127+
}
128+
120129
func theme() -> YotiSDKTheme? {
121130
guard let theme = _configuration?.theme else {
122131
return nil

ios/Theme/ColorTheme.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
2222
let borderCritical: UIColor
2323
let borderEmphasis2: UIColor
2424
let icon: UIColor
25+
let icon2: UIColor
2526
let icon3: UIColor
2627
let iconEmphasis: UIColor
2728
let iconWarning: UIColor
@@ -53,6 +54,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
5354
let borderCritical = try container.decode(String.self, forKey: .borderCritical)
5455
let borderEmphasis2 = try container.decode(String.self, forKey: .borderEmphasis2)
5556
let icon = try container.decode(String.self, forKey: .icon)
57+
let icon2 = try container.decode(String.self, forKey: .icon2)
5658
let icon3 = try container.decode(String.self, forKey: .icon3)
5759
let iconEmphasis = try container.decode(String.self, forKey: .iconEmphasis)
5860
let iconWarning = try container.decode(String.self, forKey: .iconWarning)
@@ -81,6 +83,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
8183
self.borderCritical = UIColor(hexString: borderCritical)
8284
self.borderEmphasis2 = UIColor(hexString: borderEmphasis2)
8385
self.icon = UIColor(hexString: icon)
86+
self.icon2 = UIColor(hexString: icon2)
8487
self.icon3 = UIColor(hexString: icon3)
8588
self.iconEmphasis = UIColor(hexString: iconEmphasis)
8689
self.iconWarning = UIColor(hexString: iconWarning)
@@ -112,6 +115,7 @@ struct ColorTheme: YotiSDKColorTheme, Decodable {
112115
case borderCritical = "border_critical"
113116
case borderEmphasis2 = "border_emphasis2"
114117
case icon
118+
case icon2
115119
case icon3
116120
case iconEmphasis = "icon_emphasis"
117121
case iconWarning = "icon_warning"

ios/Theme/IconTheme.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ struct IconTheme: YotiSDKIconTheme, Decodable {
1616
var eye: YotiSDKIcon?
1717
var exclamationmark: YotiSDKIcon?
1818
var face: YotiSDKIcon?
19+
var help: YotiSDKIcon?
1920
var identityDocumentCapture: YotiSDKIcon?
2021
var info: YotiSDKIcon?
2122
var largeLeftChevron: YotiSDKIcon?
@@ -60,6 +61,9 @@ struct IconTheme: YotiSDKIconTheme, Decodable {
6061
if let icon = try container.decodeIfPresent(Icon.self, forKey: .face) {
6162
face = YotiSDKIcon(icon)
6263
}
64+
if let icon = try container.decodeIfPresent(Icon.self, forKey: .help) {
65+
help = YotiSDKIcon(icon)
66+
}
6367
if let icon = try container.decodeIfPresent(Icon.self, forKey: .identityDocumentCapture) {
6468
identityDocumentCapture = YotiSDKIcon(icon)
6569
}
@@ -106,6 +110,7 @@ struct IconTheme: YotiSDKIconTheme, Decodable {
106110
case eye
107111
case exclamationmark
108112
case face
113+
case help
109114
case identityDocumentCapture = "identity_document_capture"
110115
case info
111116
case largeLeftChevron = "large_left_chevron"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "https://www.yoti.com/terms/identity-verification",
66
"author": "Yoti Ltd",
77
"main": "RNYotiDocScan.js",
8-
"version": "5.0.1",
8+
"version": "6.0.0-alpha.1",
99
"peerDependencies": {
1010
"react": ">=18.0.0",
1111
"react-native": ">=0.70.0"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"single_flow": true,
3+
"include_identity_document_module_type": true,
4+
"include_supplementary_document_module_type": false,
5+
"include_facetec_module_type": false,
6+
"include_face_capture_module_type": false,
7+
"disable_identity_document_capture_edge_detection": false
8+
}

0 commit comments

Comments
 (0)