@regulaforensics/react-native-document-reader-api 9.10.914-rc → 9.10.915-rc

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.
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
12
12
  s.homepage = 'https://regulaforensics.com'
13
13
 
14
14
  s.source = { :http => 'file:' + __dir__ }
15
- s.ios.deployment_target = '16.0'
15
+ s.ios.deployment_target = '15.0'
16
16
  s.source_files = "ios/*.{h,m}"
17
17
  s.dependency 'DocumentReaderStage', '9.10.7309'
18
18
  s.dependency 'React'
@@ -789,14 +789,12 @@ fun getLivenessParams(input: LivenessParams?) = input?.let {
789
789
  fun setAuthenticityPropertiesParams(input: AuthenticityPropertiesParams, opts: JSONObject) = opts.forEach { k, v ->
790
790
  when (k) {
791
791
  "checkHoldersSignature" -> input.checkHoldersSignature = v as Boolean
792
- "checkDocumentDamage" -> input.checkDocumentDamage = v as Boolean
793
792
  }
794
793
  }
795
794
 
796
795
  fun getAuthenticityPropertiesParams(input: AuthenticityPropertiesParams?) = input?.let {
797
796
  mapOf(
798
797
  "checkHoldersSignature" to it.checkHoldersSignature,
799
- "checkDocumentDamage" to it.checkDocumentDamage,
800
798
  ).toJson()
801
799
  }
802
800
 
@@ -260,10 +260,8 @@ fun generateScannerConfig(input: ScannerConfig?) = input?.let {
260
260
  }
261
261
 
262
262
  fun recognizeConfigFromJSON(input: JSONObject) = input.let {
263
- val builder =
264
- if (it.has("scenario") && it.has("onlineProcessingConfig")) RecognizeConfig.Builder(it.getString("scenario"), onlineProcessingConfigFromJSON(it.getJSONObject("onlineProcessingConfig"))!!)
265
- else if (it.has("scenario")) RecognizeConfig.Builder(it.getString("scenario"))
266
- else RecognizeConfig.Builder(onlineProcessingConfigFromJSON(it.getJSONObject("onlineProcessingConfig"))!!)
263
+ val builder = if (it.has("scenario")) RecognizeConfig.Builder(it.getString("scenario"))
264
+ else RecognizeConfig.Builder(onlineProcessingConfigFromJSON(it.getJSONObject("onlineProcessingConfig"))!!)
267
265
 
268
266
  if (it.has("oneShotIdentification")) builder.setOneShotIdentification(it.getBoolean("oneShotIdentification"))
269
267
  if (it.has("dtc")) builder.setDTC(it.getString("dtc").toByteArray()!!)
@@ -562,15 +560,25 @@ fun generateOcclusionCheckParams(input: OcclusionCheckParams?) = input?.let {
562
560
 
563
561
  @SuppressLint("DiscouragedApi")
564
562
  fun typefaceFromJSON(it: JSONObject): Pair<Typeface?, Int?> {
565
- val name = it.getString("name")
566
563
  val font = try {
567
564
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
568
- context.resources.getFont(context.resources.getIdentifier(name, "font", context.packageName))
569
- else null
570
- } catch (_: Exception) { null }
565
+ context.resources.getFont(
566
+ context.resources.getIdentifier(
567
+ it.getString("name"),
568
+ "font",
569
+ context.packageName
570
+ )
571
+ )
572
+ else throw Exception("")
573
+ } catch (_: Exception) {
574
+ Typeface.create(
575
+ it.getString("name"),
576
+ it.optInt("style", Typeface.NORMAL)
577
+ )
578
+ }
571
579
  return Pair(
572
- font ?: Typeface.create(name, it.optInt("style", Typeface.NORMAL)),
573
- it.getIntOrNull("size")
580
+ font,
581
+ if (it.has("size")) it.getInt("size") else null
574
582
  )
575
583
  }
576
584
 
@@ -21,7 +21,6 @@ import com.regula.documentreader.api.completions.IVideoEncoderCompletion
21
21
  import com.regula.documentreader.api.completions.model.PrepareProgress
22
22
  import com.regula.documentreader.api.completions.rfid.ICaProtocolCompletion
23
23
  import com.regula.documentreader.api.completions.rfid.IPaceProtocolCompletion
24
- import com.regula.documentreader.api.completions.rfid.IRfidAaChallengeCompletion
25
24
  import com.regula.documentreader.api.completions.rfid.IRfidPKDCertificateCompletion
26
25
  import com.regula.documentreader.api.completions.rfid.IRfidReaderCompletion
27
26
  import com.regula.documentreader.api.completions.rfid.IRfidReaderRequest
@@ -93,7 +92,6 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
93
92
  "providePACertificates" -> providePACertificates(argsNullable(0))
94
93
  "provideTACertificates" -> provideTACertificates(argsNullable(0))
95
94
  "provideTASignature" -> provideTASignature(args(0))
96
- "provideAAChallenge" -> provideAAChallenge(args(0))
97
95
  "selectPACEProtocol" -> selectPACEProtocol(args(0))
98
96
  "selectCAProtocol" -> selectCAProtocol(args(0))
99
97
  "setTCCParams" -> setTCCParams(callback, args(0))
@@ -156,7 +154,6 @@ const val rfidOnRetryReadChipEvent = "rfidOnRetryReadChipEvent"
156
154
  const val paCertificateCompletionEvent = "pa_certificate_completion"
157
155
  const val taCertificateCompletionEvent = "ta_certificate_completion"
158
156
  const val taSignatureCompletionEvent = "ta_signature_completion"
159
- const val aaChallengeCompletionEvent = "aaChallengeCompletionEvent"
160
157
  const val paceProtocolCompletionEvent = "paceProtocolCompletionEvent"
161
158
  const val caProtocolCompletionEvent = "caProtocolCompletionEvent"
162
159
 
@@ -284,8 +281,6 @@ fun provideTASignature(signature: String?) = taSignatureCompletion.onSignatureRe
284
281
  signature.toByteArray()
285
282
  )
286
283
 
287
- fun provideAAChallenge(challenge: String?) = aaChallengeCompletion.onChallengeReceived(challenge)
288
-
289
284
  fun selectPACEProtocol(protocol: JSONObject) = paceProtocolCompletion.onPaceProtocolSelected(
290
285
  paceProtocolFromJSON(protocol)!!
291
286
  )
@@ -555,7 +550,6 @@ fun initCompletion(callback: Callback) = IDocumentReaderInitCompletion { success
555
550
  lateinit var paCertificateCompletion: IRfidPKDCertificateCompletion
556
551
  lateinit var taCertificateCompletion: IRfidPKDCertificateCompletion
557
552
  lateinit var taSignatureCompletion: IRfidTASignatureCompletion
558
- lateinit var aaChallengeCompletion: IRfidAaChallengeCompletion
559
553
  lateinit var paceProtocolCompletion: IPaceProtocolCompletion
560
554
  lateinit var caProtocolCompletion: ICaProtocolCompletion
561
555
 
@@ -565,23 +559,19 @@ fun getRfidReaderRequest(config: JSONObject? = null): IRfidReaderRequest {
565
559
  val result = IRfidReaderRequest()
566
560
  if (config == null) return result
567
561
 
568
- if (config.getBooleanOrNull("paCertificates") == true) result.setPACertificates { serialNumber, issuer, completion ->
562
+ if (config.getBoolean("paCertificates")) result.setPACertificates { serialNumber, issuer, completion ->
569
563
  paCertificateCompletion = completion
570
564
  sendEvent(paCertificateCompletionEvent, generatePACertificateCompletion(serialNumber, issuer))
571
565
  }
572
- if (config.getBooleanOrNull("taCertificates") == true) result.setTACertificates { keyCAR, completion ->
566
+ if (config.getBoolean("taCertificates")) result.setTACertificates { keyCAR, completion ->
573
567
  taCertificateCompletion = completion
574
568
  sendEvent(taCertificateCompletionEvent, keyCAR)
575
569
  }
576
- if (config.getBooleanOrNull("taSignature") == true) result.setTASignature { challenge, completion ->
570
+ if (config.getBoolean("taSignature")) result.setTASignature { challenge, completion ->
577
571
  taSignatureCompletion = completion
578
572
  sendEvent(taSignatureCompletionEvent, generateTAChallenge(challenge))
579
573
  }
580
- if (config.getBooleanOrNull("aaChallenge") == true) result.setRfidAaChallenge { challenge, completion ->
581
- aaChallengeCompletion = completion
582
- sendEvent(aaChallengeCompletionEvent, challenge)
583
- }
584
- if (config.getBooleanOrNull("paceProtocol") == true || config.getBooleanOrNull("caProtocol") == true) result.setRfidAccessControl(object : IRfidAccessControl {
574
+ if (config.getBoolean("paceProtocol") || config.getBoolean("caProtocol")) result.setRfidAccessControl(object : IRfidAccessControl {
585
575
  override fun onRequestPaceProtocol(list: List<PaceProtocol?>, completion: IPaceProtocolCompletion) {
586
576
  paceProtocolCompletion = completion
587
577
  sendEvent(paceProtocolCompletionEvent, list.toJson(::generatePaceProtocol))
package/example/README.md CHANGED
@@ -15,16 +15,19 @@ $ cd ios
15
15
  $ pod install
16
16
  ```
17
17
 
18
+ **Note**: make sure that Metro Bundler is running when you run your app. Otherwise, run `npx react-native start` command. If it fails to start, run `git init` from Project root, then `npx react-native start`.
19
+
18
20
  4. Android:
19
21
  * Copy the `regula.license` file to the `example/android/app/src/main/assets` folder.
20
- * Run `npm run android` (or `npx react-native run-android --no-packager`) inside `example` folder - this is just one way to run the app. You can also run it directly from within Android Studio.
22
+ * Run `npx react-native run-android` inside `example` folder - this is just one way to run the app. You can also run it directly from within Android Studio. **Note**: `npx react-native log-android` is used to view logs.
21
23
  * If gradle sync fails, select JDK-17 in Android Studio
22
24
 
23
25
  **Note**: if the running failed with the following error `Error: spawn ./gradlew EACCES`, try to run the following command `chmod +x gradlew` within the `example/android` directory.
24
26
 
25
27
  5. iOS:
26
28
  * Copy the `regula.license` file to the `example/ios` folder.
27
- * Run `npm run ios` (or `npx react-native run-ios --no-packager`) inside `example` folder - this is just one way to run the app. You can also run it directly from within Xcode.
29
+ * Run `npx react-native run-ios` inside `example` folder - this is just one way to run the app. You can also run it directly from within Xcode.
30
+ * This example does not support MacOS-27+ and iOS-27+
28
31
 
29
32
  # Troubleshooting license issues
30
33
 
@@ -18,8 +18,10 @@ react {
18
18
  // cliFile = file("../node_modules/react-native/cli.js")
19
19
 
20
20
  /* Variants */
21
- // Bundle JS and assets for every variant, including Debug.
22
- debuggableVariants = []
21
+ // The list of variants to that are debuggable. For those we're going to
22
+ // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
23
+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
24
+ // debuggableVariants = ["liteDebug", "prodDebug"]
23
25
 
24
26
  /* Bundling */
25
27
  // A list containing the node command and its flags. Default is just 'node'.
@@ -19,8 +19,7 @@ public class MainApplication extends Application implements ReactApplication {
19
19
  new DefaultReactNativeHost(this) {
20
20
  @Override
21
21
  public boolean getUseDeveloperSupport() {
22
- // Load the embedded JS bundle directly, including in Debug builds.
23
- return false;
22
+ return BuildConfig.DEBUG;
24
23
  }
25
24
 
26
25
  @Override
@@ -1,18 +1,11 @@
1
1
  #import "AppDelegate.h"
2
2
 
3
- #import <React/RCTDevLoadingViewSetEnabled.h>
4
- #import <React/RCTDevSettings.h>
3
+ #import <React/RCTBundleURLProvider.h>
5
4
 
6
5
  @implementation AppDelegate
7
6
 
8
7
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
9
8
  {
10
- // This demo runs from the embedded bundle, including in Debug builds.
11
- RCTDevLoadingViewSetEnabled(NO);
12
- RCTDevSettingsSetEnabled(NO);
13
-
14
- // UIWindow is owned by SceneDelegate under the scene-based lifecycle.
15
- self.automaticallyLoadReactNativeWindow = NO;
16
9
  self.moduleName = @"DocumentReader";
17
10
  // You can add your custom initial props in the dictionary below.
18
11
  // They will be passed down to the ViewController used by React Native.
@@ -28,7 +21,11 @@
28
21
 
29
22
  - (NSURL *)bundleURL
30
23
  {
24
+ #if DEBUG
25
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
26
+ #else
31
27
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
28
+ #endif
32
29
  }
33
30
 
34
31
  @end
@@ -43,23 +43,6 @@
43
43
  <string></string>
44
44
  <key>NSPhotoLibraryUsageDescription</key>
45
45
  <string>To use gallery</string>
46
- <key>UIApplicationSceneManifest</key>
47
- <dict>
48
- <key>UIApplicationSupportsMultipleScenes</key>
49
- <false/>
50
- <key>UISceneConfigurations</key>
51
- <dict>
52
- <key>UIWindowSceneSessionRoleApplication</key>
53
- <array>
54
- <dict>
55
- <key>UISceneConfigurationName</key>
56
- <string>Default Configuration</string>
57
- <key>UISceneDelegateClassName</key>
58
- <string>SceneDelegate</string>
59
- </dict>
60
- </array>
61
- </dict>
62
- </dict>
63
46
  <key>UILaunchStoryboardName</key>
64
47
  <string>LaunchScreen</string>
65
48
  <key>UIRequiredDeviceCapabilities</key>
@@ -17,7 +17,6 @@
17
17
  7699B88040F8A987B510C191 /* libPods-DocumentReader-DocumentReaderTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-DocumentReader-DocumentReaderTests.a */; };
18
18
  81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
19
19
  970CEEFE26CC4F5086D8C455 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 0B138461659C02ED353D3184 /* PrivacyInfo.xcprivacy */; };
20
- A12700000000000000000001 /* SceneDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = A12700000000000000000002 /* SceneDelegate.mm */; };
21
20
  /* End PBXBuildFile section */
22
21
 
23
22
  /* Begin PBXContainerItemProxy section */
@@ -52,8 +51,6 @@
52
51
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = DocumentReader/LaunchScreen.storyboard; sourceTree = "<group>"; };
53
52
  89C6BE57DB24E9ADA2F236DE /* Pods-DocumentReader-DocumentReaderTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DocumentReader-DocumentReaderTests.release.xcconfig"; path = "Target Support Files/Pods-DocumentReader-DocumentReaderTests/Pods-DocumentReader-DocumentReaderTests.release.xcconfig"; sourceTree = "<group>"; };
54
53
  ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
55
- A12700000000000000000002 /* SceneDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = SceneDelegate.mm; path = DocumentReader/SceneDelegate.mm; sourceTree = "<group>"; };
56
- A12700000000000000000003 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SceneDelegate.h; path = DocumentReader/SceneDelegate.h; sourceTree = "<group>"; };
57
54
  /* End PBXFileReference section */
58
55
 
59
56
  /* Begin PBXFrameworksBuildPhase section */
@@ -101,8 +98,6 @@
101
98
  3471549F2A4D9A1500361434 /* DocumentReader.entitlements */,
102
99
  13B07FAF1A68108700A75B9A /* AppDelegate.h */,
103
100
  13B07FB01A68108700A75B9A /* AppDelegate.mm */,
104
- A12700000000000000000002 /* SceneDelegate.mm */,
105
- A12700000000000000000003 /* SceneDelegate.h */,
106
101
  13B07FB51A68108700A75B9A /* Images.xcassets */,
107
102
  13B07FB61A68108700A75B9A /* Info.plist */,
108
103
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
@@ -193,6 +188,7 @@
193
188
  buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DocumentReader" */;
194
189
  buildPhases = (
195
190
  C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
191
+ FD10A7F022414F080027D42C /* Start Packager */,
196
192
  13B07F871A680F5B00A75B9A /* Sources */,
197
193
  13B07F8C1A680F5B00A75B9A /* Frameworks */,
198
194
  13B07F8E1A680F5B00A75B9A /* Resources */,
@@ -282,7 +278,7 @@
282
278
  );
283
279
  runOnlyForDeploymentPostprocessing = 0;
284
280
  shellPath = /bin/sh;
285
- shellScript = "set -e\n\n# Embed JS for Debug simulators too; no Metro server is needed at runtime.\nexport FORCE_BUNDLING=1\nexport EXTRA_PACKAGER_ARGS=\"$EXTRA_PACKAGER_ARGS --dev false\"\nexport SKIP_BUNDLING_METRO_IP=1\nexport RCT_NO_LAUNCH_PACKAGER=1\nunset SKIP_BUNDLING\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
281
+ shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
286
282
  };
287
283
  00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
288
284
  isa = PBXShellScriptBuildPhase;
@@ -396,7 +392,25 @@
396
392
  shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DocumentReader-DocumentReaderTests/Pods-DocumentReader-DocumentReaderTests-resources.sh\"\n";
397
393
  showEnvVarsInLog = 0;
398
394
  };
399
-
395
+ FD10A7F022414F080027D42C /* Start Packager */ = {
396
+ isa = PBXShellScriptBuildPhase;
397
+ buildActionMask = 2147483647;
398
+ files = (
399
+ );
400
+ inputFileListPaths = (
401
+ );
402
+ inputPaths = (
403
+ );
404
+ name = "Start Packager";
405
+ outputFileListPaths = (
406
+ );
407
+ outputPaths = (
408
+ );
409
+ runOnlyForDeploymentPostprocessing = 0;
410
+ shellPath = /bin/sh;
411
+ shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
412
+ showEnvVarsInLog = 0;
413
+ };
400
414
  /* End PBXShellScriptBuildPhase section */
401
415
 
402
416
  /* Begin PBXSourcesBuildPhase section */
@@ -413,7 +427,6 @@
413
427
  buildActionMask = 2147483647;
414
428
  files = (
415
429
  13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
416
- A12700000000000000000001 /* SceneDelegate.mm in Sources */,
417
430
  13B07FC11A68108700A75B9A /* main.m in Sources */,
418
431
  );
419
432
  runOnlyForDeploymentPostprocessing = 0;
@@ -439,7 +452,7 @@
439
452
  "$(inherited)",
440
453
  );
441
454
  INFOPLIST_FILE = DocumentReaderTests/Info.plist;
442
- IPHONEOS_DEPLOYMENT_TARGET = 17.6;
455
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
443
456
  LD_RUNPATH_SEARCH_PATHS = (
444
457
  "$(inherited)",
445
458
  "@executable_path/Frameworks",
@@ -463,7 +476,7 @@
463
476
  BUNDLE_LOADER = "$(TEST_HOST)";
464
477
  COPY_PHASE_STRIP = NO;
465
478
  INFOPLIST_FILE = DocumentReaderTests/Info.plist;
466
- IPHONEOS_DEPLOYMENT_TARGET = 17.6;
479
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
467
480
  LD_RUNPATH_SEARCH_PATHS = (
468
481
  "$(inherited)",
469
482
  "@executable_path/Frameworks",
@@ -593,7 +606,7 @@
593
606
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
594
607
  GCC_WARN_UNUSED_FUNCTION = YES;
595
608
  GCC_WARN_UNUSED_VARIABLE = YES;
596
- IPHONEOS_DEPLOYMENT_TARGET = 17.6;
609
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
597
610
  LD_RUNPATH_SEARCH_PATHS = (
598
611
  /usr/lib/swift,
599
612
  "$(inherited)",
@@ -665,7 +678,7 @@
665
678
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
666
679
  GCC_WARN_UNUSED_FUNCTION = YES;
667
680
  GCC_WARN_UNUSED_VARIABLE = YES;
668
- IPHONEOS_DEPLOYMENT_TARGET = 17.6;
681
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
669
682
  LD_RUNPATH_SEARCH_PATHS = (
670
683
  /usr/lib/swift,
671
684
  "$(inherited)",
@@ -8,7 +8,7 @@ require Pod::Executable.execute_command('node', ['-p',
8
8
  {paths: [process.argv[1]]},
9
9
  )', __dir__]).strip
10
10
 
11
- platform :ios, '17.6'
11
+ platform :ios, min_ios_version_supported
12
12
  prepare_react_native_project!
13
13
 
14
14
  linkage = ENV['USE_FRAMEWORKS']
@@ -3,14 +3,14 @@
3
3
  "version": "0.0.1",
4
4
  "private": true,
5
5
  "scripts": {
6
- "android": "react-native run-android --no-packager",
7
- "ios": "react-native run-ios --no-packager",
6
+ "android": "react-native run-android",
7
+ "ios": "react-native run-ios",
8
8
  "lint": "eslint .",
9
9
  "start": "react-native start",
10
10
  "test": "jest"
11
11
  },
12
12
  "dependencies": {
13
- "@regulaforensics/react-native-document-reader-api": "9.10.914-rc",
13
+ "@regulaforensics/react-native-document-reader-api": "9.10.915-rc",
14
14
  "@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.10.3862-rc",
15
15
  "@rneui/base": "4.0.0-rc.7",
16
16
  "@rneui/themed": "4.0.0-rc.7",
package/index.d.ts CHANGED
@@ -2213,14 +2213,12 @@ export class LivenessParams {
2213
2213
 
2214
2214
  export class AuthenticityPropertiesParams {
2215
2215
  checkHoldersSignature?: boolean
2216
- checkDocumentDamage?: boolean
2217
2216
 
2218
2217
  static fromJson(jsonObject?: any): AuthenticityPropertiesParams | undefined {
2219
2218
  if (jsonObject == null || jsonObject == undefined) return undefined
2220
2219
  const result = new AuthenticityPropertiesParams
2221
2220
 
2222
2221
  result.checkHoldersSignature = jsonObject["checkHoldersSignature"]
2223
- result.checkDocumentDamage = jsonObject["checkDocumentDamage"]
2224
2222
 
2225
2223
  return result
2226
2224
  }
@@ -3488,23 +3486,21 @@ export class CAProtocol {
3488
3486
  }
3489
3487
 
3490
3488
  export class RFIDConfig {
3491
- paCertificates?: boolean
3492
- taCertificates?: boolean
3493
- taSignature?: boolean
3494
- aaChallenge?: boolean
3495
- paceProtocol?: boolean
3496
- caProtocol?: boolean
3489
+ onRequestPACertificates?: boolean
3490
+ onRequestTACertificates?: boolean
3491
+ onRequestTASignature?: boolean
3492
+ onRequestPACEProtocol?: boolean
3493
+ onRequestCAProtocol?: boolean
3497
3494
 
3498
3495
  static fromJson(jsonObject?: any): RFIDConfig | undefined {
3499
3496
  if (jsonObject == null || jsonObject == undefined) return undefined
3500
3497
  const result = new RFIDConfig
3501
3498
 
3502
- result.paCertificates = jsonObject["paCertificates"]
3503
- result.taCertificates = jsonObject["taCertificates"]
3504
- result.taSignature = jsonObject["taSignature"]
3505
- result.aaChallenge = jsonObject["aaChallenge"]
3506
- result.paceProtocol = jsonObject["paceProtocol"]
3507
- result.caProtocol = jsonObject["caProtocol"]
3499
+ result.onRequestPACertificates = jsonObject["onRequestPACertificates"]
3500
+ result.onRequestTACertificates = jsonObject["onRequestTACertificates"]
3501
+ result.onRequestTASignature = jsonObject["onRequestTASignature"]
3502
+ result.onRequestPACEProtocol = jsonObject["onRequestPACEProtocol"]
3503
+ result.onRequestCAProtocol = jsonObject["onRequestCAProtocol"]
3508
3504
 
3509
3505
  return result
3510
3506
  }
@@ -4382,8 +4378,6 @@ export const eCheckDiagnose = {
4382
4378
  CHD_PROPERTY_NO_SIGNATURE: 260,
4383
4379
  CHD_PROPERTY_TEXT_AS_SIGNATURE: 261,
4384
4380
  CHD_PROPERTY_FINGERPRINT_AS_SIGNATURE: 262,
4385
- CHD_PROPERTY_DOCUMENT_DAMAGED: 263,
4386
- CHD_PROPERTY_DOCUMENT_CANCELLED: 264,
4387
4381
  }
4388
4382
 
4389
4383
  export const eMDLIntentToRetain = {
@@ -4800,7 +4794,6 @@ export const eRPRM_SecurityFeatureType = {
4800
4794
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
4801
4795
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
4802
4796
  SECURITY_FEATURE_TYPE_SIGNATURE_PRESENCE: 62,
4803
- SECURITY_FEATURE_TYPE_DAMAGE_CHECK: 63,
4804
4797
  }
4805
4798
 
4806
4799
  export const OnlineMode = {
@@ -5927,8 +5920,6 @@ export const eVisualFieldType = {
5927
5920
  FT_DLCLASSCODE_B3_FROM: 706,
5928
5921
  FT_DLCLASSCODE_B3_TO: 707,
5929
5922
  FT_DLCLASSCODE_B3_NOTES: 708,
5930
- FT_ADDRESS_POST_OFFICE: 709,
5931
- FT_ADDRESS_LOT: 710,
5932
5923
  }
5933
5924
 
5934
5925
  export const DocReaderOrientation = {
@@ -6291,7 +6282,6 @@ export default class DocumentReader {
6291
6282
  static providePACertificates(certificates: PKDCertificate[] | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6292
6283
  static provideTACertificates(certificates: PKDCertificate[] | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6293
6284
  static provideTASignature(signature: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6294
- static provideAAChallenge(challenge: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6295
6285
  static selectPACEProtocol(protocol: PACEProtocol, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6296
6286
  static selectCAProtocol(protocol: CAProtocol, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6297
6287
  static setTCCParams(params: TccParams, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
package/index.js CHANGED
@@ -1503,7 +1503,6 @@ export class AuthenticityPropertiesParams {
1503
1503
  const result = new AuthenticityPropertiesParams()
1504
1504
 
1505
1505
  result.checkHoldersSignature = jsonObject["checkHoldersSignature"]
1506
- result.checkDocumentDamage = jsonObject["checkDocumentDamage"]
1507
1506
 
1508
1507
  return result
1509
1508
  }
@@ -2273,12 +2272,11 @@ export class RFIDConfig {
2273
2272
  if (jsonObject == null) return null
2274
2273
  const result = new RFIDConfig()
2275
2274
 
2276
- result.paCertificates = jsonObject["paCertificates"]
2277
- result.taCertificates = jsonObject["taCertificates"]
2278
- result.taSignature = jsonObject["taSignature"]
2279
- result.aaChallenge = jsonObject["aaChallenge"]
2280
- result.paceProtocol = jsonObject["paceProtocol"]
2281
- result.caProtocol = jsonObject["caProtocol"]
2275
+ result.onRequestPACertificates = jsonObject["onRequestPACertificates"]
2276
+ result.onRequestTACertificates = jsonObject["onRequestTACertificates"]
2277
+ result.onRequestTASignature = jsonObject["onRequestTASignature"]
2278
+ result.onRequestPACEProtocol = jsonObject["onRequestPACEProtocol"]
2279
+ result.onRequestCAProtocol = jsonObject["onRequestCAProtocol"]
2282
2280
 
2283
2281
  return result
2284
2282
  }
@@ -3158,8 +3156,6 @@ export const eCheckDiagnose = {
3158
3156
  CHD_PROPERTY_NO_SIGNATURE: 260,
3159
3157
  CHD_PROPERTY_TEXT_AS_SIGNATURE: 261,
3160
3158
  CHD_PROPERTY_FINGERPRINT_AS_SIGNATURE: 262,
3161
- CHD_PROPERTY_DOCUMENT_DAMAGED: 263,
3162
- CHD_PROPERTY_DOCUMENT_CANCELLED: 264,
3163
3159
  }
3164
3160
 
3165
3161
  export const eMDLIntentToRetain = {
@@ -3576,7 +3572,6 @@ export const eRPRM_SecurityFeatureType = {
3576
3572
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
3577
3573
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
3578
3574
  SECURITY_FEATURE_TYPE_SIGNATURE_PRESENCE: 62,
3579
- SECURITY_FEATURE_TYPE_DAMAGE_CHECK: 63,
3580
3575
  }
3581
3576
 
3582
3577
  export const OnlineMode = {
@@ -4703,8 +4698,6 @@ export const eVisualFieldType = {
4703
4698
  FT_DLCLASSCODE_B3_FROM: 706,
4704
4699
  FT_DLCLASSCODE_B3_TO: 707,
4705
4700
  FT_DLCLASSCODE_B3_NOTES: 708,
4706
- FT_ADDRESS_POST_OFFICE: 709,
4707
- FT_ADDRESS_LOT: 710,
4708
4701
  }
4709
4702
 
4710
4703
  export const DocReaderOrientation = {
@@ -5068,7 +5061,6 @@ DocumentReader.stopRFIDReader = (successCallback, errorCallback) => RNRegulaDocu
5068
5061
  DocumentReader.providePACertificates = (certificates, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "providePACertificates", [certificates], successCallback, errorCallback)
5069
5062
  DocumentReader.provideTACertificates = (certificates, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "provideTACertificates", [certificates], successCallback, errorCallback)
5070
5063
  DocumentReader.provideTASignature = (signature, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "provideTASignature", [signature], successCallback, errorCallback)
5071
- DocumentReader.provideAAChallenge = (challenge, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "provideAAChallenge", [challenge], successCallback, errorCallback)
5072
5064
  DocumentReader.selectPACEProtocol = (protocol, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "selectPACEProtocol", [protocol], successCallback, errorCallback)
5073
5065
  DocumentReader.selectCAProtocol = (protocol, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "selectCAProtocol", [protocol], successCallback, errorCallback)
5074
5066
  DocumentReader.setTCCParams = (params, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setTCCParams", [params], successCallback, errorCallback)
package/ios/RGLWConfig.m CHANGED
@@ -1102,7 +1102,6 @@
1102
1102
 
1103
1103
  +(void)setAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)result input:(NSDictionary*)input {
1104
1104
  if(input[@"checkHoldersSignature"]) result.checkHoldersSignature = input[@"checkHoldersSignature"];
1105
- if(input[@"checkDocumentDamage"]) result.checkDocumentDamage = input[@"checkDocumentDamage"];
1106
1105
  }
1107
1106
 
1108
1107
  +(NSDictionary*)getAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)input {
@@ -1110,7 +1109,6 @@
1110
1109
  NSMutableDictionary *result = [NSMutableDictionary new];
1111
1110
 
1112
1111
  result[@"checkHoldersSignature"] = input.checkHoldersSignature;
1113
- result[@"checkDocumentDamage"] = input.checkDocumentDamage;
1114
1112
 
1115
1113
  return result;
1116
1114
  }
@@ -246,7 +246,6 @@ static NSMutableArray* weakReferencesHolder;
246
246
  }
247
247
 
248
248
  if (input[@"scenario"]) config.scenario = input[@"scenario"];
249
- if (input[@"onlineProcessingConfig"]) config.onlineProcessingConfig = [self onlineProcessingConfigFromJson:input[@"onlineProcessingConfig"]];
250
249
  if (input[@"livePortrait"]) config.livePortrait = [self imageWithBase64:input[@"livePortrait"]];
251
250
  if (input[@"extPortrait"]) config.extPortrait = [self imageWithBase64:input[@"extPortrait"]];
252
251
  if (input[@"oneShotIdentification"]) config.oneShotIdentification = input[@"oneShotIdentification"];
package/ios/RGLWMain.h CHANGED
@@ -27,7 +27,6 @@ static NSString* _Nonnull rfidOnRetryReadChipEvent = @"rfidOnRetryReadChipEvent"
27
27
  static NSString* _Nonnull paCertificateCompletionEvent = @"pa_certificate_completion";
28
28
  static NSString* _Nonnull taCertificateCompletionEvent = @"ta_certificate_completion";
29
29
  static NSString* _Nonnull taSignatureCompletionEvent = @"ta_signature_completion";
30
- static NSString* _Nonnull aaChallengeCompletionEvent = @"aaChallengeCompletionEvent";
31
30
  static NSString* _Nonnull paceProtocolCompletionEvent = @"paceProtocolCompletionEvent";
32
31
  static NSString* _Nonnull caProtocolCompletionEvent = @"caProtocolCompletionEvent";
33
32
  static NSString* _Nonnull drVideoEncoderCompletionEvent = @"video_encoder_completion";
package/ios/RGLWMain.m CHANGED
@@ -47,7 +47,6 @@
47
47
  @"providePACertificates": ^{ [self providePACertificates :args[0]]; },
48
48
  @"provideTACertificates": ^{ [self provideTACertificates :args[0]]; },
49
49
  @"provideTASignature": ^{ [self provideTASignature :args[0]]; },
50
- @"provideAAChallenge": ^{ [self provideAAChallenge :args[0]]; },
51
50
  @"selectPACEProtocol": ^{ [self selectPACEProtocol :args[0]]; },
52
51
  @"selectCAProtocol": ^{ [self selectCAProtocol :args[0]]; },
53
52
  @"setTCCParams": ^{ [self setTCCParams :args[0] :callback]; },
@@ -290,10 +289,6 @@ static NSDictionary* headers;
290
289
  taSignatureCompletion([RGLWJSONConstructor base64Decode:signature]);
291
290
  }
292
291
 
293
- +(void)provideAAChallenge:(NSString*)challenge {
294
- aaChallengeCompletion(challenge);
295
- }
296
-
297
292
  +(void)selectPACEProtocol:(NSDictionary*)protocol {
298
293
  paceProtocolCompletion([RGLWJSONConstructor paceProtocolFromJson:protocol]);
299
294
  }
@@ -637,7 +632,6 @@ RGLWCallback savedCallbackForBluetoothResult;
637
632
  RGLRFIDCertificatesCallback paCertificateCompletion;
638
633
  RGLRFIDCertificatesCallback taCertificateCompletion;
639
634
  RGLWRFIDSignatureCallback taSignatureCompletion;
640
- RGLRFIDAAChallengeCallback aaChallengeCompletion;
641
635
  RGLRFIDAccessControlPACECallback paceProtocolCompletion;
642
636
  RGLRFIDAccessControlCACallback caProtocolCompletion;
643
637
 
@@ -673,16 +667,6 @@ NSDictionary* rfidReaderRequest;
673
667
  }
674
668
  }
675
669
 
676
- - (void)onRequestAAChallenge:(NSString*)challenge callback:(void(^)(NSString* challenge))callback {
677
- if ([rfidReaderRequest isKindOfClass:[NSDictionary class]] && [rfidReaderRequest[@"aaChallenge"] boolValue]) {
678
- aaChallengeCompletion = callback;
679
- sendEvent(aaChallengeCompletionEvent, challenge);
680
- } else {
681
- aaChallengeCompletion = nil;
682
- callback(nil);
683
- }
684
- }
685
-
686
670
  - (void)onRequestPACEProtocolWithOptions:(NSArray<RGLRFIDAccessControlPACE*>*)protocols callback:(RGLRFIDAccessControlPACECallback)callback {
687
671
  if ([rfidReaderRequest isKindOfClass:[NSDictionary class]] && [rfidReaderRequest[@"paceProtocol"] boolValue]) {
688
672
  paceProtocolCompletion = callback;
@@ -15,7 +15,6 @@ RCT_EXPORT_MODULE();
15
15
  paCertificateCompletionEvent,
16
16
  taCertificateCompletionEvent,
17
17
  taSignatureCompletionEvent,
18
- aaChallengeCompletionEvent,
19
18
  paceProtocolCompletionEvent,
20
19
  caProtocolCompletionEvent,
21
20
  drVideoEncoderCompletionEvent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/react-native-document-reader-api",
3
- "version": "9.10.914-rc",
3
+ "version": "9.10.915-rc",
4
4
  "description": "React Native module for reading and validation of identification documents (API framework)",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,7 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
-
3
- @interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
4
-
5
- @property (nonatomic, strong) UIWindow *window;
6
-
7
- @end
@@ -1,27 +0,0 @@
1
- #import "SceneDelegate.h"
2
- #import "AppDelegate.h"
3
-
4
- @implementation SceneDelegate
5
-
6
- - (void)scene:(UIScene *)scene
7
- willConnectToSession:(UISceneSession *)session
8
- options:(UISceneConnectionOptions *)connectionOptions
9
- {
10
- if (![scene isKindOfClass:[UIWindowScene class]]) {
11
- return;
12
- }
13
-
14
- AppDelegate *appDelegate = (AppDelegate *)UIApplication.sharedApplication.delegate;
15
- UIView *rootView = [appDelegate.rootViewFactory viewWithModuleName:appDelegate.moduleName
16
- initialProperties:appDelegate.initialProps];
17
- UIViewController *rootViewController = [appDelegate createRootViewController];
18
- [appDelegate setRootView:rootView toRootViewController:rootViewController];
19
-
20
- self.window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene *)scene];
21
- self.window.rootViewController = rootViewController;
22
- // Keep compatibility with native modules that access the app delegate's window.
23
- appDelegate.window = self.window;
24
- [self.window makeKeyAndVisible];
25
- }
26
-
27
- @end