Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose initialiseWith* functions on react-native #83

Merged
merged 13 commits into from
Jan 27, 2025
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 10.2.3
* Exposed `initializeWithApiKey` missing for initializing using the api key
* Exposed `initializeWithConfig` missing for initializing using the config json

## 10.2.2
* Fixed setting `kotlinVersion` and `kotlinCompilerExtensionVersion`

Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ PODS:
- React-debug
- react-native-safe-area-context (4.14.0):
- React-Core
- react-native-smile-id (10.2.2):
- react-native-smile-id (10.2.3):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -1444,7 +1444,7 @@ SPEC CHECKSUMS:
React-logger: 29fa3e048f5f67fe396bc08af7606426d9bd7b5d
React-Mapbuffer: bf56147c9775491e53122a94c423ac201417e326
react-native-safe-area-context: 4532f1a0c5d34a46b9324ccaaedcb5582a302b7d
react-native-smile-id: 51ea0d04401552e49a59558ca6eb1b199cc3f16d
react-native-smile-id: 2c6c6c6f5c42b74964c94ea84a91302508ca6526
React-nativeconfig: 9f223cd321823afdecf59ed00861ab2d69ee0fc1
React-NativeModulesApple: ff7efaff7098639db5631236cfd91d60abff04c0
React-perflogger: 32ed45d9cee02cf6639acae34251590dccd30994
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": "@smile_identity/react-native",
"version": "10.2.2",
"version": "10.2.3",
"description": "Official wrapper for the Smile ID <v10 android and iOS SDKs",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
20 changes: 20 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
ValidDocumentsResponse,
JobType,
IdInfo,
Config,
} from './types';
import type {
DocumentVerificationRequest,
Expand Down Expand Up @@ -68,6 +69,25 @@ const SmileID = {
*/
initialize: (useSandBox: boolean = false) => _SmileID.initialize(useSandBox),

initializeWithApiKey: (
apiKey: string,
config: Config,
useSandBox: boolean,
enableCrashReporting: boolean
) =>
_SmileID.initializeWithApiKey(
apiKey,
config,
useSandBox,
enableCrashReporting
),

initializeWithConfig: (
config: Config,
useSandBox: boolean,
enableCrashReporting: boolean
) => _SmileID.initializeWithConfig(config, useSandBox, enableCrashReporting),

/**
* Sets allow offline mode which enables
* offline mode functionality to capture jobs offline and submit later
Expand Down
Loading