Skip to content

Commit adb6026

Browse files
author
RN SDK Release User
committed
v14.6.0 release
1 parent 4c13ffe commit adb6026

File tree

12 files changed

+62
-21
lines changed

12 files changed

+62
-21
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [NEXT] -
9+
10+
## [14.6.0] - 2025-04-24
11+
12+
### Changed:
13+
14+
- Updated underlying Onfido native SDK version:
15+
- iOS 32.5.x (up from 32.4.x)
16+
- Android 22.7.x (up from 22.6.x)
17+
18+
### Fixed:
19+
20+
- Allowed `captureDocument.allowedDocumentTypes` typing to have multiple document types
21+
- Changed `flowSteps` and `Theme` to optional to be consistent with documentation
22+
823
## [14.5.0] - 2025-04-08
924

1025
### Changed:

SampleApp/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ PODS:
1111
- ReactCommon/turbomodule/core (= 0.73.8)
1212
- fmt (6.2.1)
1313
- glog (0.3.5)
14-
- Onfido (32.4.0)
15-
- onfido-react-native-sdk (14.4.0):
16-
- Onfido (~> 32.4.0)
14+
- Onfido (32.5.0)
15+
- onfido-react-native-sdk (14.5.0):
16+
- Onfido (~> 32.5.0)
1717
- React
1818
- RCT-Folly (2022.05.16.00):
1919
- boost
@@ -1185,8 +1185,8 @@ SPEC CHECKSUMS:
11851185
FBReactNativeSpec: bbe8b686178e5ce03d1d8a356789f211f91f31b8
11861186
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
11871187
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
1188-
Onfido: 60a53fd00902511f0d66f890329c7734081f208f
1189-
onfido-react-native-sdk: 245b1558bf226a6d351f4e858e87f00e2e39041c
1188+
Onfido: 12b81b0fd5030b1213b94484d71b2ad0e2c8a153
1189+
onfido-react-native-sdk: 333fc1a4f2a0adab640ef2db5738f6e7c6b8e7c8
11901190
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
11911191
RCTRequired: 0c7f03a41ee32dec802c74c341e317a4165973d5
11921192
RCTTypeSafety: 57698bb7fcde424922e201dab377f496a08a63e3
@@ -1233,4 +1233,4 @@ SPEC CHECKSUMS:
12331233

12341234
PODFILE CHECKSUM: 86f683f21cbc1b07185e06dfa8611fbe4ec3b645
12351235

1236-
COCOAPODS: 1.16.1
1236+
COCOAPODS: 1.15.2

SampleApp/yalc.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"version": "v1",
33
"packages": {
44
"@onfido/react-native-sdk": {
5-
"signature": "3f419cc19ac3d97a5fbab2825b385195",
5+
"signature": "14f384766f59d9d5bb0a994fe9610f59",
66
"file": true
77
}
88
}

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def DEFAULT_COMPILE_SDK_VERSION = 34
1414
def DEFAULT_MIN_SDK_VERSION = 21
1515
def DEFAULT_TARGET_SDK_VERSION = 34
16-
def NATIVE_ANDROID_SDK_VERSION = "22.6.+"
16+
def NATIVE_ANDROID_SDK_VERSION = "22.7.+"
1717

1818
def safeExtGet(prop, fallback) {
1919
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback

android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
<meta-data
1010
android:name="onfido_integration_version"
11-
android:value="14.5.0" />
11+
android:value="14.6.0" />
1212
</application>
1313
</manifest>

android/src/main/java/com/onfido/reactnative/sdk/OnfidoSdkModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void start(final ReadableMap config, final Promise promise) {
113113
currentPromise.reject("error", new EnterpriseFeaturesInvalidLogoCobrandingException());
114114
currentPromise = null;
115115
} catch (final EnterpriseFeatureNotEnabledException e) {
116-
currentPromise.reject("error", new EnterpriseFeatureNotEnabledException("logoCobrand"));
116+
currentPromise.reject("error", e);
117117
currentPromise = null;
118118
} catch (final Exception e) {
119119
currentPromise.reject("error", new Exception(e.getMessage(), e));
@@ -443,7 +443,7 @@ private static FlowStep getFlowStep(
443443
case DRIVING_LICENCE:
444444
return DocumentCaptureStepBuilder.forDrivingLicence().withCountry(countryCodeEnum).build();
445445
case NATIONAL_IDENTITY_CARD:
446-
DocumentCaptureStepBuilder.forNationalIdentity().withCountry(countryCodeEnum).build();
446+
return DocumentCaptureStepBuilder.forNationalIdentity().withCountry(countryCodeEnum).build();
447447
case RESIDENCE_PERMIT:
448448
return DocumentCaptureStepBuilder.forResidencePermit().withCountry(countryCodeEnum)
449449
.build();

ios/PluginMetadata.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ - (instancetype)init
1313
self = [super init];
1414
if (self) {
1515
_pluginPlatform = @"react-native";
16-
_pluginVersion = @"14.5.0";
16+
_pluginVersion = @"14.6.0";
1717
}
1818
return self;
1919
}

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ install! 'cocoapods',
2727
disable_input_output_paths: true
2828

2929
target 'OnfidoSdk' do
30-
pod 'Onfido', '~> 32.4.0'
30+
pod 'Onfido', '~> 32.5.0'
3131

3232
config = use_native_modules!
3333
use_react_native!(

js/__tests__/Onfido.spec.ts

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Platform } from "react-native";
2-
import { OnfidoCountryCode, OnfidoCaptureType, OnfidoDocumentType, OnfidoConfig } from "../config_constants";
2+
import { OnfidoCountryCode, OnfidoCaptureType, OnfidoDocumentType, OnfidoConfig, OnfidoFlowSteps } from "../config_constants";
33
import Onfido from "../Onfido";
44

55
// add mock
@@ -30,7 +30,7 @@ const start = (config: OnfidoConfig) => {
3030
});
3131
};
3232

33-
const flowSteps = {
33+
const flowSteps : OnfidoFlowSteps = {
3434
welcome: true,
3535
captureDocument: {
3636
docType: OnfidoDocumentType.DRIVING_LICENCE,
@@ -77,10 +77,36 @@ testCases.forEach((platform) => {
7777
});
7878

7979
test('resolve with a valid workflow runId without flow steps', () => {
80-
return start({ ...baseConfig, flowSteps: null, workflowRunId: workflowRunId }).then(result => expect(result).toBe(RESOLVED))
80+
return start({ ...baseConfig, flowSteps: undefined, workflowRunId: workflowRunId }).then(result => expect(result).toBe(RESOLVED))
81+
});
82+
83+
test('resolve with a classic workflow with allowedDocumentTypes', () => {
84+
return start(
85+
{
86+
...baseConfig,
87+
flowSteps: {
88+
captureDocument: {
89+
allowedDocumentTypes: [OnfidoDocumentType.DRIVING_LICENCE, OnfidoDocumentType.PASSPORT]
90+
}
91+
}
92+
}).then(result => expect(result).toBe(RESOLVED))
8193
});
8294

8395
// Invalid Configuration Tests
96+
test('reject when using allowedDocumentTypes together with docType/docCountry', () => {
97+
return start(
98+
{
99+
...baseConfig,
100+
flowSteps: {
101+
captureDocument: {
102+
docType: OnfidoDocumentType.DRIVING_LICENCE,
103+
countryCode: OnfidoCountryCode.GBR,
104+
allowedDocumentTypes: [OnfidoDocumentType.DRIVING_LICENCE, OnfidoDocumentType.PASSPORT]
105+
}
106+
}
107+
}).then(result => expect(result).toBe(REJECTED))
108+
});
109+
84110
test('reject a null config object', () => {
85111
return start(null as unknown as OnfidoConfig).then(result => expect(result).toBe(REJECTED))
86112
});

js/config_constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type OnfidoFlowSteps = {
44
countryCode?: OnfidoCountryCode;
55
alpha2CountryCode?: OnfidoAlpha2CountryCode;
66
docType?: OnfidoDocumentType;
7-
allowedDocumentTypes?: [OnfidoDocumentType]
7+
allowedDocumentTypes?: OnfidoDocumentType[];
88
};
99
captureFace?: OnfidoFaceCapture;
1010
proofOfAddress?: boolean;
@@ -42,7 +42,7 @@ export type OnfidoResult = {
4242
export type OnfidoConfig = {
4343
sdkToken: string;
4444
workflowRunId?: string;
45-
flowSteps: OnfidoFlowSteps;
45+
flowSteps?: OnfidoFlowSteps;
4646
hideLogo?: boolean;
4747
logoCoBrand?: boolean;
4848
/**
@@ -54,7 +54,7 @@ export type OnfidoConfig = {
5454
localisation?: {
5555
ios_strings_file_name?: string;
5656
};
57-
theme: OnfidoTheme;
57+
theme?: OnfidoTheme;
5858
};
5959

6060
export interface OnfidoError extends Error {

0 commit comments

Comments
 (0)