@regulaforensics/idv 3.10.226-nightly → 3.10.231-beta

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.
Files changed (78) hide show
  1. package/Package.swift +27 -0
  2. package/README.md +3 -0
  3. package/android/CDVIDV.kt +5 -3
  4. package/android/build.gradle.kts +41 -0
  5. package/android/cordova.gradle.kts +20 -0
  6. package/android/src/main/{java → kotlin}/com/regula/plugin/idv/RNIDVModule.kt +3 -2
  7. package/app.plugin.js +10 -7
  8. package/examples/capacitor/README.md +2 -0
  9. package/examples/capacitor/android/app/build.gradle +2 -10
  10. package/examples/capacitor/android/build.gradle +12 -3
  11. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  12. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  13. package/examples/capacitor/android/gradle.properties +4 -0
  14. package/examples/capacitor/android/gradlew +4 -7
  15. package/examples/capacitor/android/gradlew.bat +82 -94
  16. package/examples/capacitor/android/variables.gradle +13 -9
  17. package/examples/capacitor/capacitor.config.json +15 -0
  18. package/examples/capacitor/index.tsx +2 -7
  19. package/examples/capacitor/ios/App/App/AppDelegate.swift +5 -40
  20. package/examples/capacitor/ios/App/App/Info.plist +18 -2
  21. package/examples/capacitor/ios/App/App/SceneDelegate.swift +23 -0
  22. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +25 -69
  23. package/examples/capacitor/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift +1 -0
  24. package/examples/capacitor/package.json +16 -18
  25. package/examples/capacitor/scripts/android.sh +5 -8
  26. package/examples/capacitor/scripts/ios.sh +5 -7
  27. package/examples/capacitor/scripts/setup.sh +2 -7
  28. package/examples/capacitor/src/main.css +5 -1
  29. package/examples/capacitor/src/main.tsx +1 -1
  30. package/examples/capacitor/vite.config.ts +0 -12
  31. package/examples/ionic/README.md +2 -0
  32. package/examples/ionic/config.xml +1 -1
  33. package/examples/ionic/index.tsx +8 -3
  34. package/examples/ionic/package.json +23 -27
  35. package/examples/ionic/scripts/android.sh +1 -3
  36. package/examples/ionic/scripts/ios.sh +0 -2
  37. package/examples/ionic/scripts/setup.sh +0 -2
  38. package/examples/ionic/src/main.tsx +1 -1
  39. package/examples/ionic/tsconfig.json +0 -1
  40. package/examples/react_native/README.md +2 -0
  41. package/examples/react_native/package.json +22 -19
  42. package/examples/react_native/scripts/android.sh +8 -6
  43. package/examples/react_native/scripts/ios.sh +7 -5
  44. package/examples/react_native/scripts/setup.sh +6 -3
  45. package/examples/react_native/src/main.tsx +1 -1
  46. package/ios/CDVIDV.swift +23 -6
  47. package/ios/{Main.swift → Implementation.swift} +4 -4
  48. package/ios/RNIDV.swift +9 -3
  49. package/ios/Utils.swift +2 -0
  50. package/package.json +1 -1
  51. package/plugin.xml +10 -10
  52. package/react-native-idv.podspec +14 -0
  53. package/test/package-lock.json +5 -2
  54. package/test/test.tsx +26 -2
  55. package/www/capacitor/index.js +21 -3
  56. package/www/capacitor/internal/bridge.js +2 -1
  57. package/www/capacitor/internal/cordova.js +2 -2
  58. package/www/cordova.js +4 -4
  59. package/www/react-native/index.js +21 -3
  60. package/www/react-native/internal/bridge.js +2 -1
  61. package/www/types/index.d.ts +13 -2
  62. package/RNIDV.podspec +0 -21
  63. package/android/build.gradle +0 -32
  64. package/android/cordova.gradle +0 -20
  65. package/examples/capacitor/android/app/capacitor.build.gradle +0 -19
  66. package/examples/capacitor/android/capacitor.settings.gradle +0 -9
  67. package/examples/capacitor/ionic.config.json +0 -7
  68. package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +0 -19
  69. package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +0 -10
  70. package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  71. package/examples/capacitor/ios/App/Podfile +0 -29
  72. package/examples/capacitor/ios/App/Podfile.lock +0 -52
  73. package/examples/capacitor/package-lock.json +0 -3063
  74. package/examples/ionic/package-lock.json +0 -16573
  75. package/examples/react_native/package-lock.json +0 -6444
  76. /package/android/src/main/{java/com/regula/plugin/idv/Main.kt → kotlin/com/regula/plugin/idv/Implementation.kt} +0 -0
  77. /package/android/src/main/{java → kotlin}/com/regula/plugin/idv/JSONConstructor.kt +0 -0
  78. /package/android/src/main/{java → kotlin}/com/regula/plugin/idv/Utils.kt +0 -0
@@ -1,13 +1,15 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- adb reverse tcp:8081 tcp:8081 >/dev/null || :
4
+ adb reverse tcp:${npm_package_config_metroPort} tcp:${npm_package_config_metroPort} >/dev/null || :
5
5
  if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
6
6
  open -a 'Android Studio' android
7
- # check if metro is already running
8
- [[ -z $(pgrep -f 'expo start') ]] && npm start
7
+ # Check if Metro is running at app's port.
8
+ if [[ "$(curl --silent --max-time 2 http://localhost:${npm_package_config_metroPort}/status)" != "packager-status:running" ]]; then
9
+ npm start
10
+ else
11
+ echo "Metro is already running on port ${npm_package_config_metroPort}."
12
+ fi
9
13
  else
10
- expo run:android --device
14
+ expo run:android --device --port ${npm_package_config_metroPort}
11
15
  fi
12
-
13
- exit 0
@@ -3,10 +3,12 @@ set -e
3
3
 
4
4
  if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
5
5
  open ios/IDV.xcworkspace
6
- # check if metro is already running
7
- [[ -z $(pgrep -f 'expo start') ]] && npm start
6
+ # Check if Metro is running at app's port.
7
+ if [[ "$(curl --silent --max-time 2 http://localhost:${npm_package_config_metroPort}/status)" != "packager-status:running" ]]; then
8
+ npm start
9
+ else
10
+ echo "Metro is already running on port ${npm_package_config_metroPort}."
11
+ fi
8
12
  else
9
- npx expo run:ios --device
13
+ npx expo run:ios --device --port ${npm_package_config_metroPort}
10
14
  fi
11
-
12
- exit 0
@@ -1,8 +1,13 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
+ # Kill Metro instance at app's port.
5
+ lsof -tiTCP:${npm_package_config_metroPort} -sTCP:LISTEN | xargs kill 2>/dev/null || true
6
+
4
7
  npm install
5
- expo prebuild
8
+ rm -rf node_modules/expo/node_modules/expo-modules-core/android/.cxx # Temp fix for expo@58.0.0-preview.3
9
+ npx expo prebuild --no-install
10
+ (cd ios && (pod install || pod update))
6
11
 
7
12
  mkdir -p android/app/src/main/assets/Regula
8
13
  mv android/app/src/main/res/raw/regula.license android/app/src/main/assets/Regula/
@@ -10,5 +15,3 @@ mv android/app/src/main/res/raw/db.dat android/app/src/main/assets/Regula/
10
15
 
11
16
  sed -i '' '$a\
12
17
  android { buildFeatures { dataBinding true } }' android/app/build.gradle
13
-
14
- exit 0
@@ -3,7 +3,7 @@ import { IDV, Workflow } from '@regulaforensics/idv'
3
3
  enum Configuration { credentials, token, apiKey }
4
4
 
5
5
  const loginType: Configuration = Configuration.credentials
6
- const baseUrl = "https://idv.regula.app"
6
+ const baseUrl = "https://app.idv-platform.com"
7
7
  const username = "username_placeholder"
8
8
  const password = "password_placeholder"
9
9
  const tokenUrl = "token_placeholder"
package/ios/CDVIDV.swift CHANGED
@@ -1,3 +1,8 @@
1
+ #if canImport(Cordova)
2
+ import Cordova
3
+ #endif
4
+ import UIKit
5
+
1
6
  @objc(CDVIDV)
2
7
  class CDVIDV: CDVPlugin {
3
8
  @objc(exec:)
@@ -33,10 +38,22 @@ func sendEvent(_ event: String, _ data: Any? = "") {
33
38
  this!.commandDelegate.send(result!, callbackId: callbackId)
34
39
  }
35
40
 
36
- let rootViewController: () -> UIViewController? = {
37
- return UIApplication.shared.connectedScenes
38
- .compactMap { $0 as? UIWindowScene }
39
- .flatMap { $0.windows }
40
- .first { $0.isKeyWindow }?
41
- .rootViewController
41
+ func withPresenter(_ action: @escaping (UIViewController) -> Void) {
42
+ DispatchQueue.main.async {
43
+ let windows = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }.filter { $0.activationState == .foregroundActive || $0.activationState == .foregroundInactive }.flatMap { $0.windows }
44
+ let candidates = windows.filter { $0.isKeyWindow } + windows.filter { !$0.isKeyWindow && !$0.isHidden && $0.alpha > 0 && $0.windowLevel == .normal }
45
+ for window in candidates {
46
+ guard var presenter = window.rootViewController else { continue }
47
+ while let next = presenter.presentedViewController
48
+ ?? (presenter as? UINavigationController)?.visibleViewController
49
+ ?? (presenter as? UINavigationController)?.topViewController
50
+ ?? (presenter as? UITabBarController)?.selectedViewController {
51
+ presenter = next
52
+ }
53
+ guard presenter.viewIfLoaded?.window != nil else { continue }
54
+ action(presenter)
55
+ return
56
+ }
57
+ print("REGULA: Cannot present the UI: no presenter available.")
58
+ }
42
59
  }
@@ -68,8 +68,8 @@ func prepareWorkflow(_ callback: @escaping Callback, _ data: [String: Any?]) {
68
68
  }
69
69
 
70
70
  func startWorkflow(_ callback: @escaping Callback, _ data: [String: Any?]?) {
71
- DispatchQueue.main.async {
72
- IDV.shared.startWorkflow(presenter: rootViewController()!,
71
+ withPresenter { presenter in
72
+ IDV.shared.startWorkflow(presenter: presenter,
73
73
  config: startWorkflowConfigFromJSON(input: data),
74
74
  completion: { result in
75
75
  callback(generateCompletion(generateWorkflowResult(result.successOrNil), result.failureOrNil))
@@ -97,8 +97,8 @@ func sendData(_ callback: @escaping Callback, _ data: [String: Any?]) {
97
97
  }
98
98
 
99
99
  func startLogin(_ callback: @escaping Callback, _ data: [String: Any?]) {
100
- DispatchQueue.main.async {
101
- IDV.shared.startLogin(presenter: rootViewController()!,
100
+ withPresenter { presenter in
101
+ IDV.shared.startLogin(presenter: presenter,
102
102
  config: loginConfigFromJSON(data),
103
103
  completion: { result in
104
104
  callback(generateCompletion(result.successOrNil, result.failureOrNil))
package/ios/RNIDV.swift CHANGED
@@ -30,9 +30,15 @@ private var this: RNIDV?
30
30
 
31
31
  func sendEvent(_ event: String, _ data: Any? = nil) {
32
32
  guard let plugin = this, hasListeners else { return }
33
+ DispatchQueue.main.async { plugin.sendEvent(withName: event, body: data.toSendable()) }
34
+ }
35
+
36
+ func withPresenter(_ action: @escaping (UIViewController) -> Void) {
33
37
  DispatchQueue.main.async {
34
- plugin.sendEvent(withName: event, body: data.toSendable())
38
+ if let presenter = RCTPresentedViewController() {
39
+ action(presenter)
40
+ return
41
+ }
42
+ print("REGULA: Cannot present Face SDK UI: no presenter available.")
35
43
  }
36
44
  }
37
-
38
- let rootViewController: () -> UIViewController? = { return RCTPresentedViewController() }
package/ios/Utils.swift CHANGED
@@ -1,3 +1,5 @@
1
+ import Foundation
2
+
1
3
  public typealias Callback = (Any?) -> Void
2
4
 
3
5
  var args: [Any?] = []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/idv",
3
- "version": "3.10.226-nightly",
3
+ "version": "3.10.231-beta",
4
4
  "description": "This is an npm module for Regula IDV, which unifies access to all Regula products. This plugin makes possible to use it with react-native, cordova and capacitor applications. Supports Android and iOS.",
5
5
  "main": "www/react-native/index.js",
6
6
  "module": "www/capacitor/index.js",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="@regulaforensics/idv" version="3.10.226-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/idv" version="3.10.231-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
3
3
  <name>IDV</name>
4
4
  <description>Cordova plugin for Regula IDV</description>
5
5
  <license>commercial</license>
@@ -9,16 +9,16 @@
9
9
  <clobbers target="IDVPlugin" />
10
10
  </js-module>
11
11
 
12
- <platform name="ios">
12
+ <platform name="ios" package="swift">
13
13
  <config-file target="config.xml" parent="/widget">
14
14
  <feature name="IDV">
15
15
  <param name="ios-package" value="CDVIDV" />
16
16
  </feature>
17
- <preference name="deployment-target" value="14.0" />
17
+ <preference name="deployment-target" value="15.0" />
18
18
  <preference name="SwiftVersion" value="5" />
19
19
  </config-file>
20
20
  <source-file src="ios/CDVIDV.swift" />
21
- <source-file src="ios/Main.swift" />
21
+ <source-file src="ios/Implementation.swift" />
22
22
  <source-file src="ios/JSONConstructor.swift" />
23
23
  <source-file src="ios/Utils.swift" />
24
24
  <podspec>
@@ -26,7 +26,7 @@
26
26
  <source url="https://github.com/regulaforensics/podspecs.git" />
27
27
  </config>
28
28
  <pods>
29
- <pod name="IDVSDKNightly" spec="3.10.2083" />
29
+ <pod name="IDVSDK" spec="3.9.1987" nospm="true" />
30
30
  </pods>
31
31
  </podspec>
32
32
  </platform>
@@ -37,10 +37,10 @@
37
37
  <param name="android-package" value="com.regula.plugin.idv.CDVIDV" />
38
38
  </feature>
39
39
  </config-file>
40
- <framework src="android/cordova.gradle" custom="true" type="gradleReference" />
41
- <source-file src="android/CDVIDV.kt" target-dir="java/com.regula.plugin.idv" />
42
- <source-file src="android/src/main/java/com/regula/plugin/idv/Main.kt" target-dir="java/com.regula.plugin.idv" />
43
- <source-file src="android/src/main/java/com/regula/plugin/idv/JSONConstructor.kt" target-dir="java/com.regula.plugin.idv" />
44
- <source-file src="android/src/main/java/com/regula/plugin/idv/Utils.kt" target-dir="java/com.regula.plugin.idv" />
40
+ <framework src="android/cordova.gradle.kts" custom="true" type="gradleReference" />
41
+ <source-file src="android/CDVIDV.kt" target-dir="kotlin/com.regula.plugin.idv" />
42
+ <source-file src="android/src/main/kotlin/com/regula/plugin/idv/Implementation.kt" target-dir="kotlin/com.regula.plugin.idv" />
43
+ <source-file src="android/src/main/kotlin/com/regula/plugin/idv/JSONConstructor.kt" target-dir="kotlin/com.regula.plugin.idv" />
44
+ <source-file src="android/src/main/kotlin/com/regula/plugin/idv/Utils.kt" target-dir="kotlin/com.regula.plugin.idv" />
45
45
  </platform>
46
46
  </plugin>
@@ -0,0 +1,14 @@
1
+ Pod::Spec.new do |s|
2
+ s.name = 'react-native-idv'
3
+ s.version = '3.10.231-beta'
4
+ s.summary = 'Regula React Native plugin.'
5
+ s.license = 'commercial'
6
+ s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
7
+ s.homepage = 'https://regulaforensics.com'
8
+ s.source = { :path => '.' }
9
+ s.ios.deployment_target = '15.0'
10
+ s.source_files = [ 'ios/*.swift', 'ios/RN*.m' ]
11
+ s.exclude_files = [ 'ios/CDVIDV.swift' ]
12
+ s.dependency 'IDVSDK', '3.9.1987'
13
+ s.dependency 'React'
14
+ end
@@ -13,9 +13,12 @@
13
13
  },
14
14
  "..": {
15
15
  "name": "@regulaforensics/idv",
16
- "version": "1.0.0",
16
+ "version": "3.10.231-beta",
17
17
  "dev": true,
18
- "license": "commercial"
18
+ "license": "commercial",
19
+ "dependencies": {
20
+ "@expo/config-plugins": "^10.0.0"
21
+ }
19
22
  },
20
23
  "node_modules/@esbuild/aix-ppc64": {
21
24
  "version": "0.25.9",
package/test/test.tsx CHANGED
@@ -1,6 +1,30 @@
1
1
  import { compare } from './utils'
2
- import { CredentialsConnectionConfig, TokenConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, Workflow, WorkflowStep, WorkflowResult, StartSessionConfig, SendDataConfig, LoginConfig } from '@regulaforensics/idv/www/capacitor'
3
- import { apiKeyConnectionConfig, credentialsConnectionConfig, prepareWorkflowConfig, startWorkflowConfig, tokenConnectionConfig, workflow, workflowStep, workflowResult, startSessionConfig, sendDataConfig, loginConfig } from './json'
2
+ import {
3
+ CredentialsConnectionConfig,
4
+ TokenConnectionConfig,
5
+ ApiKeyConnectionConfig,
6
+ PrepareWorkflowConfig,
7
+ StartWorkflowConfig,
8
+ Workflow,
9
+ WorkflowStep,
10
+ WorkflowResult,
11
+ StartSessionConfig,
12
+ SendDataConfig,
13
+ LoginConfig,
14
+ } from '@regulaforensics/idv/www/capacitor'
15
+ import {
16
+ apiKeyConnectionConfig,
17
+ credentialsConnectionConfig,
18
+ prepareWorkflowConfig,
19
+ startWorkflowConfig,
20
+ tokenConnectionConfig,
21
+ workflow,
22
+ workflowStep,
23
+ workflowResult,
24
+ startSessionConfig,
25
+ sendDataConfig,
26
+ loginConfig,
27
+ } from './json'
4
28
 
5
29
  compare('credentialsConnectionConfig', credentialsConnectionConfig, CredentialsConnectionConfig.fromJson)
6
30
  compare('tokenConnectionConfig', tokenConnectionConfig, TokenConnectionConfig.fromJson)
@@ -1,4 +1,11 @@
1
- import { exec, serializeInterface, setDidStartSessionCompletion, setDidEndSessionCompletion, setDidStartRestoreSessionCompletion, setDidContinueRemoteSessionCompletion } from './internal/bridge'
1
+ import {
2
+ exec,
3
+ serializeInterface,
4
+ setDidStartSessionCompletion,
5
+ setDidEndSessionCompletion,
6
+ setDidStartRestoreSessionCompletion,
7
+ setDidContinueRemoteSessionCompletion,
8
+ } from './internal/bridge'
2
9
 
3
10
  import { TokenConnectionConfig } from './config/token_connection_config'
4
11
  import { CredentialsConnectionConfig } from './config/credentials_connection_config'
@@ -11,8 +18,19 @@ import { LoginConfig } from './config/login_config'
11
18
  import { Workflow } from './model/workflow'
12
19
  import { WorkflowResult } from './model/workflow_result'
13
20
  import { WorkflowStep } from './model/workflow_step'
14
-
15
- export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, LoginConfig, Workflow, WorkflowResult, WorkflowStep }
21
+ export {
22
+ TokenConnectionConfig,
23
+ CredentialsConnectionConfig,
24
+ ApiKeyConnectionConfig,
25
+ PrepareWorkflowConfig,
26
+ StartWorkflowConfig,
27
+ StartSessionConfig,
28
+ SendDataConfig,
29
+ LoginConfig,
30
+ Workflow,
31
+ WorkflowResult,
32
+ WorkflowStep,
33
+ }
16
34
 
17
35
  export class IDV {
18
36
  static get instance() { return IDV._instance }
@@ -8,7 +8,8 @@ export async function exec(name, params) {
8
8
  }
9
9
 
10
10
  export function serializeInterface(value, ctor) {
11
- if (value == null) return null
11
+ if (value === undefined) return undefined
12
+ if (value === null) return null
12
13
  if (value instanceof ctor) return value.toJson()
13
14
  return (new ctor(value)).toJson()
14
15
  }
@@ -1,8 +1,8 @@
1
- var _exec = (completion, params) => cordova.exec(completion, null, "IDV", "exec", params)
1
+ var _exec = (completion, params, errorCallback = null) => cordova.exec(completion, errorCallback, "IDV", "exec", params)
2
2
 
3
3
  export const NativeModules = {
4
4
  RNIDV: {
5
- exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
5
+ exec: async (name, params) => new Promise((resolve, reject) => _exec(resolve, [name, ...params], error => reject(new Error(error))))
6
6
  }
7
7
  }
8
8
 
package/www/cordova.js CHANGED
@@ -357,7 +357,8 @@ async function exec(name, params) {
357
357
  }
358
358
 
359
359
  function serializeInterface(value, ctor) {
360
- if (value == null) return null
360
+ if (value === undefined) return undefined
361
+ if (value === null) return null
361
362
  if (value instanceof ctor) return value.toJson()
362
363
  return (new ctor(value)).toJson()
363
364
  }
@@ -407,11 +408,11 @@ __webpack_require__.r(__webpack_exports__);
407
408
  /* harmony export */ NativeEventEmitter: () => (/* binding */ NativeEventEmitter),
408
409
  /* harmony export */ NativeModules: () => (/* binding */ NativeModules)
409
410
  /* harmony export */ });
410
- var _exec = (completion, params) => cordova.exec(completion, null, "IDV", "exec", params)
411
+ var _exec = (completion, params, errorCallback = null) => cordova.exec(completion, errorCallback, "IDV", "exec", params)
411
412
 
412
413
  const NativeModules = {
413
414
  RNIDV: {
414
- exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
415
+ exec: async (name, params) => new Promise((resolve, reject) => _exec(resolve, [name, ...params], error => reject(new Error(error))))
415
416
  }
416
417
  }
417
418
 
@@ -642,7 +643,6 @@ __webpack_require__.r(__webpack_exports__);
642
643
 
643
644
 
644
645
 
645
-
646
646
  class IDV {
647
647
  static get instance() { return IDV._instance }
648
648
  static _instance = new IDV()
@@ -1,4 +1,11 @@
1
- import { exec, serializeInterface, setDidStartSessionCompletion, setDidEndSessionCompletion, setDidStartRestoreSessionCompletion, setDidContinueRemoteSessionCompletion } from './internal/bridge'
1
+ import {
2
+ exec,
3
+ serializeInterface,
4
+ setDidStartSessionCompletion,
5
+ setDidEndSessionCompletion,
6
+ setDidStartRestoreSessionCompletion,
7
+ setDidContinueRemoteSessionCompletion,
8
+ } from './internal/bridge'
2
9
 
3
10
  import { TokenConnectionConfig } from './config/token_connection_config'
4
11
  import { CredentialsConnectionConfig } from './config/credentials_connection_config'
@@ -11,8 +18,19 @@ import { LoginConfig } from './config/login_config'
11
18
  import { Workflow } from './model/workflow'
12
19
  import { WorkflowResult } from './model/workflow_result'
13
20
  import { WorkflowStep } from './model/workflow_step'
14
-
15
- export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, LoginConfig, Workflow, WorkflowResult, WorkflowStep }
21
+ export {
22
+ TokenConnectionConfig,
23
+ CredentialsConnectionConfig,
24
+ ApiKeyConnectionConfig,
25
+ PrepareWorkflowConfig,
26
+ StartWorkflowConfig,
27
+ StartSessionConfig,
28
+ SendDataConfig,
29
+ LoginConfig,
30
+ Workflow,
31
+ WorkflowResult,
32
+ WorkflowStep,
33
+ }
16
34
 
17
35
  export class IDV {
18
36
  static get instance() { return IDV._instance }
@@ -8,7 +8,8 @@ export async function exec(name, params) {
8
8
  }
9
9
 
10
10
  export function serializeInterface(value, ctor) {
11
- if (value == null) return null
11
+ if (value === undefined) return undefined
12
+ if (value === null) return null
12
13
  if (value instanceof ctor) return value.toJson()
13
14
  return (new ctor(value)).toJson()
14
15
  }
@@ -9,8 +9,19 @@ import { LoginConfig } from './config/login_config'
9
9
  import { Workflow } from './model/workflow'
10
10
  import { WorkflowResult } from './model/workflow_result'
11
11
  import { WorkflowStep } from './model/workflow_step'
12
-
13
- export { TokenConnectionConfig, CredentialsConnectionConfig, ApiKeyConnectionConfig, PrepareWorkflowConfig, StartWorkflowConfig, StartSessionConfig, SendDataConfig, LoginConfig, Workflow, WorkflowResult, WorkflowStep }
12
+ export {
13
+ TokenConnectionConfig,
14
+ CredentialsConnectionConfig,
15
+ ApiKeyConnectionConfig,
16
+ PrepareWorkflowConfig,
17
+ StartWorkflowConfig,
18
+ StartSessionConfig,
19
+ SendDataConfig,
20
+ LoginConfig,
21
+ Workflow,
22
+ WorkflowResult,
23
+ WorkflowStep,
24
+ }
14
25
 
15
26
  /**
16
27
  * Entry point of the Regula IDV.
package/RNIDV.podspec DELETED
@@ -1,21 +0,0 @@
1
- require 'json'
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
- source = File.join(__dir__, 'ios')
5
-
6
- Pod::Spec.new do |s|
7
- s.name = 'RNIDV'
8
- s.version = '3.10.226-nightly'
9
- s.summary = package['description']
10
- s.license = package['license']
11
-
12
- s.authors = { 'RegulaForensics' => 'support@regulaforensics.com' }
13
- s.homepage = 'https://regulaforensics.com'
14
-
15
- s.source = { http: "file:#{source}" }
16
- s.ios.deployment_target = '14.0'
17
- s.source_files = [ 'ios/**/*.swift', 'ios/**/RN*.m' ]
18
- s.exclude_files = [ 'ios/CDVIDV.swift' ]
19
- s.dependency 'IDVSDKNightly', '3.10.2083'
20
- s.dependency 'React'
21
- end
@@ -1,32 +0,0 @@
1
- apply plugin: 'com.android.library'
2
- apply plugin: 'kotlin-android'
3
- apply plugin: 'kotlin-kapt'
4
-
5
- android {
6
- namespace 'com.regula.plugin.idv'
7
- compileSdk 36
8
-
9
- defaultConfig {
10
- minSdkVersion 24
11
- }
12
-
13
- buildFeatures {
14
- dataBinding true
15
- }
16
- }
17
-
18
- rootProject.allprojects {
19
- repositories {
20
- maven {
21
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
22
- }
23
- }
24
- }
25
-
26
- dependencies {
27
- implementation 'com.facebook.react:react-native:+'
28
- implementation('com.regula.idv:api:3.10.454') {
29
- transitive = true
30
- }
31
- }
32
-
@@ -1,20 +0,0 @@
1
- apply plugin: 'kotlin-android'
2
- apply plugin: 'kotlin-kapt'
3
-
4
- android {
5
- buildFeatures {
6
- dataBinding true
7
- }
8
- }
9
-
10
- repositories {
11
- maven {
12
- url "https://maven.regulaforensics.com/RegulaDocumentReader/Nightly"
13
- }
14
- }
15
-
16
- dependencies {
17
- implementation('com.regula.idv:api:3.10.454') {
18
- transitive = true
19
- }
20
- }
@@ -1,19 +0,0 @@
1
- // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2
-
3
- android {
4
- compileOptions {
5
- sourceCompatibility JavaVersion.VERSION_21
6
- targetCompatibility JavaVersion.VERSION_21
7
- }
8
- }
9
-
10
- apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
11
- dependencies {
12
- implementation project(':capacitor-app')
13
- implementation project(':capacitor-status-bar')
14
-
15
- }
16
-
17
- if (hasProperty('postBuildExtras')) {
18
- postBuildExtras()
19
- }
@@ -1,9 +0,0 @@
1
- // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2
- include ':capacitor-android'
3
- project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
4
-
5
- include ':capacitor-app'
6
- project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
7
-
8
- include ':capacitor-status-bar'
9
- project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
@@ -1,7 +0,0 @@
1
- {
2
- "name": "IDV",
3
- "integrations": {
4
- "capacitor": {}
5
- },
6
- "type": "react-vite"
7
- }
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14111" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3
- <device id="retina4_7" orientation="portrait">
4
- <adaptation id="fullscreen"/>
5
- </device>
6
- <dependencies>
7
- <deployment identifier="iOS"/>
8
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
9
- </dependencies>
10
- <scenes>
11
- <!--Bridge View Controller-->
12
- <scene sceneID="tne-QT-ifu">
13
- <objects>
14
- <viewController id="BYZ-38-t0r" customClass="CAPBridgeViewController" customModule="Capacitor" sceneMemberID="viewController"/>
15
- <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
16
- </objects>
17
- </scene>
18
- </scenes>
19
- </document>
@@ -1,10 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "group:App.xcodeproj">
6
- </FileRef>
7
- <FileRef
8
- location = "group:Pods/Pods.xcodeproj">
9
- </FileRef>
10
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,29 +0,0 @@
1
- source 'https://github.com/CocoaPods/Specs.git'
2
- source 'https://github.com/regulaforensics/podspecs.git'
3
-
4
- require_relative '../../node_modules/@capacitor/ios/scripts/pods_helpers'
5
-
6
- platform :ios, '15.0'
7
- use_frameworks!
8
-
9
- # workaround to avoid Xcode caching of Pods that requires
10
- # Product -> Clean Build Folder after new Cordova plugins installed
11
- # Requires CocoaPods 1.6 or newer
12
- install! 'cocoapods', :disable_input_output_paths => true
13
-
14
- def capacitor_pods
15
- pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
16
- pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
17
- pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
18
- pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
19
- pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
20
- end
21
-
22
- target 'App' do
23
- capacitor_pods
24
- # Add your Pods here
25
- end
26
-
27
- post_install do |installer|
28
- assertDeploymentTarget(installer)
29
- end