@regulaforensics/react-native-document-reader-api 9.10.913-rc → 9.10.914-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 = '15.0'
15
+ s.ios.deployment_target = '16.0'
16
16
  s.source_files = "ios/*.{h,m}"
17
17
  s.dependency 'DocumentReaderStage', '9.10.7309'
18
18
  s.dependency 'React'
@@ -789,12 +789,14 @@ 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
792
793
  }
793
794
  }
794
795
 
795
796
  fun getAuthenticityPropertiesParams(input: AuthenticityPropertiesParams?) = input?.let {
796
797
  mapOf(
797
798
  "checkHoldersSignature" to it.checkHoldersSignature,
799
+ "checkDocumentDamage" to it.checkDocumentDamage,
798
800
  ).toJson()
799
801
  }
800
802
 
@@ -260,8 +260,10 @@ fun generateScannerConfig(input: ScannerConfig?) = input?.let {
260
260
  }
261
261
 
262
262
  fun recognizeConfigFromJSON(input: JSONObject) = input.let {
263
- val builder = if (it.has("scenario")) RecognizeConfig.Builder(it.getString("scenario"))
264
- else RecognizeConfig.Builder(onlineProcessingConfigFromJSON(it.getJSONObject("onlineProcessingConfig"))!!)
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"))!!)
265
267
 
266
268
  if (it.has("oneShotIdentification")) builder.setOneShotIdentification(it.getBoolean("oneShotIdentification"))
267
269
  if (it.has("dtc")) builder.setDTC(it.getString("dtc").toByteArray()!!)
@@ -560,25 +562,15 @@ fun generateOcclusionCheckParams(input: OcclusionCheckParams?) = input?.let {
560
562
 
561
563
  @SuppressLint("DiscouragedApi")
562
564
  fun typefaceFromJSON(it: JSONObject): Pair<Typeface?, Int?> {
565
+ val name = it.getString("name")
563
566
  val font = try {
564
567
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
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
- }
568
+ context.resources.getFont(context.resources.getIdentifier(name, "font", context.packageName))
569
+ else null
570
+ } catch (_: Exception) { null }
579
571
  return Pair(
580
- font,
581
- if (it.has("size")) it.getInt("size") else null
572
+ font ?: Typeface.create(name, it.optInt("style", Typeface.NORMAL)),
573
+ it.getIntOrNull("size")
582
574
  )
583
575
  }
584
576
 
@@ -21,6 +21,7 @@ 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
24
25
  import com.regula.documentreader.api.completions.rfid.IRfidPKDCertificateCompletion
25
26
  import com.regula.documentreader.api.completions.rfid.IRfidReaderCompletion
26
27
  import com.regula.documentreader.api.completions.rfid.IRfidReaderRequest
@@ -92,6 +93,7 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
92
93
  "providePACertificates" -> providePACertificates(argsNullable(0))
93
94
  "provideTACertificates" -> provideTACertificates(argsNullable(0))
94
95
  "provideTASignature" -> provideTASignature(args(0))
96
+ "provideAAChallenge" -> provideAAChallenge(args(0))
95
97
  "selectPACEProtocol" -> selectPACEProtocol(args(0))
96
98
  "selectCAProtocol" -> selectCAProtocol(args(0))
97
99
  "setTCCParams" -> setTCCParams(callback, args(0))
@@ -154,6 +156,7 @@ const val rfidOnRetryReadChipEvent = "rfidOnRetryReadChipEvent"
154
156
  const val paCertificateCompletionEvent = "pa_certificate_completion"
155
157
  const val taCertificateCompletionEvent = "ta_certificate_completion"
156
158
  const val taSignatureCompletionEvent = "ta_signature_completion"
159
+ const val aaChallengeCompletionEvent = "aaChallengeCompletionEvent"
157
160
  const val paceProtocolCompletionEvent = "paceProtocolCompletionEvent"
158
161
  const val caProtocolCompletionEvent = "caProtocolCompletionEvent"
159
162
 
@@ -281,6 +284,8 @@ fun provideTASignature(signature: String?) = taSignatureCompletion.onSignatureRe
281
284
  signature.toByteArray()
282
285
  )
283
286
 
287
+ fun provideAAChallenge(challenge: String?) = aaChallengeCompletion.onChallengeReceived(challenge)
288
+
284
289
  fun selectPACEProtocol(protocol: JSONObject) = paceProtocolCompletion.onPaceProtocolSelected(
285
290
  paceProtocolFromJSON(protocol)!!
286
291
  )
@@ -550,6 +555,7 @@ fun initCompletion(callback: Callback) = IDocumentReaderInitCompletion { success
550
555
  lateinit var paCertificateCompletion: IRfidPKDCertificateCompletion
551
556
  lateinit var taCertificateCompletion: IRfidPKDCertificateCompletion
552
557
  lateinit var taSignatureCompletion: IRfidTASignatureCompletion
558
+ lateinit var aaChallengeCompletion: IRfidAaChallengeCompletion
553
559
  lateinit var paceProtocolCompletion: IPaceProtocolCompletion
554
560
  lateinit var caProtocolCompletion: ICaProtocolCompletion
555
561
 
@@ -559,19 +565,23 @@ fun getRfidReaderRequest(config: JSONObject? = null): IRfidReaderRequest {
559
565
  val result = IRfidReaderRequest()
560
566
  if (config == null) return result
561
567
 
562
- if (config.getBoolean("paCertificates")) result.setPACertificates { serialNumber, issuer, completion ->
568
+ if (config.getBooleanOrNull("paCertificates") == true) result.setPACertificates { serialNumber, issuer, completion ->
563
569
  paCertificateCompletion = completion
564
570
  sendEvent(paCertificateCompletionEvent, generatePACertificateCompletion(serialNumber, issuer))
565
571
  }
566
- if (config.getBoolean("taCertificates")) result.setTACertificates { keyCAR, completion ->
572
+ if (config.getBooleanOrNull("taCertificates") == true) result.setTACertificates { keyCAR, completion ->
567
573
  taCertificateCompletion = completion
568
574
  sendEvent(taCertificateCompletionEvent, keyCAR)
569
575
  }
570
- if (config.getBoolean("taSignature")) result.setTASignature { challenge, completion ->
576
+ if (config.getBooleanOrNull("taSignature") == true) result.setTASignature { challenge, completion ->
571
577
  taSignatureCompletion = completion
572
578
  sendEvent(taSignatureCompletionEvent, generateTAChallenge(challenge))
573
579
  }
574
- if (config.getBoolean("paceProtocol") || config.getBoolean("caProtocol")) result.setRfidAccessControl(object : IRfidAccessControl {
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 {
575
585
  override fun onRequestPaceProtocol(list: List<PaceProtocol?>, completion: IPaceProtocolCompletion) {
576
586
  paceProtocolCompletion = completion
577
587
  sendEvent(paceProtocolCompletionEvent, list.toJson(::generatePaceProtocol))
package/example/README.md CHANGED
@@ -15,19 +15,16 @@ $ 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
-
20
18
  4. Android:
21
19
  * Copy the `regula.license` file to the `example/android/app/src/main/assets` folder.
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.
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.
23
21
  * If gradle sync fails, select JDK-17 in Android Studio
24
22
 
25
23
  **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.
26
24
 
27
25
  5. iOS:
28
26
  * Copy the `regula.license` file to the `example/ios` folder.
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+
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.
31
28
 
32
29
  # Troubleshooting license issues
33
30
 
@@ -18,10 +18,8 @@ react {
18
18
  // cliFile = file("../node_modules/react-native/cli.js")
19
19
 
20
20
  /* Variants */
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"]
21
+ // Bundle JS and assets for every variant, including Debug.
22
+ debuggableVariants = []
25
23
 
26
24
  /* Bundling */
27
25
  // A list containing the node command and its flags. Default is just 'node'.
@@ -19,7 +19,8 @@ public class MainApplication extends Application implements ReactApplication {
19
19
  new DefaultReactNativeHost(this) {
20
20
  @Override
21
21
  public boolean getUseDeveloperSupport() {
22
- return BuildConfig.DEBUG;
22
+ // Load the embedded JS bundle directly, including in Debug builds.
23
+ return false;
23
24
  }
24
25
 
25
26
  @Override
@@ -1,11 +1,18 @@
1
1
  #import "AppDelegate.h"
2
2
 
3
- #import <React/RCTBundleURLProvider.h>
3
+ #import <React/RCTDevLoadingViewSetEnabled.h>
4
+ #import <React/RCTDevSettings.h>
4
5
 
5
6
  @implementation AppDelegate
6
7
 
7
8
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8
9
  {
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;
9
16
  self.moduleName = @"DocumentReader";
10
17
  // You can add your custom initial props in the dictionary below.
11
18
  // They will be passed down to the ViewController used by React Native.
@@ -21,11 +28,7 @@
21
28
 
22
29
  - (NSURL *)bundleURL
23
30
  {
24
- #if DEBUG
25
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
26
- #else
27
31
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
28
- #endif
29
32
  }
30
33
 
31
34
  @end
@@ -43,6 +43,23 @@
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>
46
63
  <key>UILaunchStoryboardName</key>
47
64
  <string>LaunchScreen</string>
48
65
  <key>UIRequiredDeviceCapabilities</key>
@@ -0,0 +1,7 @@
1
+ #import <UIKit/UIKit.h>
2
+
3
+ @interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
4
+
5
+ @property (nonatomic, strong) UIWindow *window;
6
+
7
+ @end
@@ -0,0 +1,27 @@
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
@@ -17,6 +17,7 @@
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 */; };
20
21
  /* End PBXBuildFile section */
21
22
 
22
23
  /* Begin PBXContainerItemProxy section */
@@ -51,6 +52,8 @@
51
52
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = DocumentReader/LaunchScreen.storyboard; sourceTree = "<group>"; };
52
53
  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>"; };
53
54
  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>"; };
54
57
  /* End PBXFileReference section */
55
58
 
56
59
  /* Begin PBXFrameworksBuildPhase section */
@@ -98,6 +101,8 @@
98
101
  3471549F2A4D9A1500361434 /* DocumentReader.entitlements */,
99
102
  13B07FAF1A68108700A75B9A /* AppDelegate.h */,
100
103
  13B07FB01A68108700A75B9A /* AppDelegate.mm */,
104
+ A12700000000000000000002 /* SceneDelegate.mm */,
105
+ A12700000000000000000003 /* SceneDelegate.h */,
101
106
  13B07FB51A68108700A75B9A /* Images.xcassets */,
102
107
  13B07FB61A68108700A75B9A /* Info.plist */,
103
108
  81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
@@ -188,7 +193,6 @@
188
193
  buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DocumentReader" */;
189
194
  buildPhases = (
190
195
  C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
191
- FD10A7F022414F080027D42C /* Start Packager */,
192
196
  13B07F871A680F5B00A75B9A /* Sources */,
193
197
  13B07F8C1A680F5B00A75B9A /* Frameworks */,
194
198
  13B07F8E1A680F5B00A75B9A /* Resources */,
@@ -278,7 +282,7 @@
278
282
  );
279
283
  runOnlyForDeploymentPostprocessing = 0;
280
284
  shellPath = /bin/sh;
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";
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";
282
286
  };
283
287
  00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
284
288
  isa = PBXShellScriptBuildPhase;
@@ -392,25 +396,7 @@
392
396
  shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DocumentReader-DocumentReaderTests/Pods-DocumentReader-DocumentReaderTests-resources.sh\"\n";
393
397
  showEnvVarsInLog = 0;
394
398
  };
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
- };
399
+
414
400
  /* End PBXShellScriptBuildPhase section */
415
401
 
416
402
  /* Begin PBXSourcesBuildPhase section */
@@ -427,6 +413,7 @@
427
413
  buildActionMask = 2147483647;
428
414
  files = (
429
415
  13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
416
+ A12700000000000000000001 /* SceneDelegate.mm in Sources */,
430
417
  13B07FC11A68108700A75B9A /* main.m in Sources */,
431
418
  );
432
419
  runOnlyForDeploymentPostprocessing = 0;
@@ -452,7 +439,7 @@
452
439
  "$(inherited)",
453
440
  );
454
441
  INFOPLIST_FILE = DocumentReaderTests/Info.plist;
455
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
442
+ IPHONEOS_DEPLOYMENT_TARGET = 17.6;
456
443
  LD_RUNPATH_SEARCH_PATHS = (
457
444
  "$(inherited)",
458
445
  "@executable_path/Frameworks",
@@ -476,7 +463,7 @@
476
463
  BUNDLE_LOADER = "$(TEST_HOST)";
477
464
  COPY_PHASE_STRIP = NO;
478
465
  INFOPLIST_FILE = DocumentReaderTests/Info.plist;
479
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
466
+ IPHONEOS_DEPLOYMENT_TARGET = 17.6;
480
467
  LD_RUNPATH_SEARCH_PATHS = (
481
468
  "$(inherited)",
482
469
  "@executable_path/Frameworks",
@@ -606,7 +593,7 @@
606
593
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
607
594
  GCC_WARN_UNUSED_FUNCTION = YES;
608
595
  GCC_WARN_UNUSED_VARIABLE = YES;
609
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
596
+ IPHONEOS_DEPLOYMENT_TARGET = 17.6;
610
597
  LD_RUNPATH_SEARCH_PATHS = (
611
598
  /usr/lib/swift,
612
599
  "$(inherited)",
@@ -678,7 +665,7 @@
678
665
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
679
666
  GCC_WARN_UNUSED_FUNCTION = YES;
680
667
  GCC_WARN_UNUSED_VARIABLE = YES;
681
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
668
+ IPHONEOS_DEPLOYMENT_TARGET = 17.6;
682
669
  LD_RUNPATH_SEARCH_PATHS = (
683
670
  /usr/lib/swift,
684
671
  "$(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, min_ios_version_supported
11
+ platform :ios, '17.6'
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",
7
- "ios": "react-native run-ios",
6
+ "android": "react-native run-android --no-packager",
7
+ "ios": "react-native run-ios --no-packager",
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.913-rc",
13
+ "@regulaforensics/react-native-document-reader-api": "9.10.914-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,12 +2213,14 @@ export class LivenessParams {
2213
2213
 
2214
2214
  export class AuthenticityPropertiesParams {
2215
2215
  checkHoldersSignature?: boolean
2216
+ checkDocumentDamage?: boolean
2216
2217
 
2217
2218
  static fromJson(jsonObject?: any): AuthenticityPropertiesParams | undefined {
2218
2219
  if (jsonObject == null || jsonObject == undefined) return undefined
2219
2220
  const result = new AuthenticityPropertiesParams
2220
2221
 
2221
2222
  result.checkHoldersSignature = jsonObject["checkHoldersSignature"]
2223
+ result.checkDocumentDamage = jsonObject["checkDocumentDamage"]
2222
2224
 
2223
2225
  return result
2224
2226
  }
@@ -3486,21 +3488,23 @@ export class CAProtocol {
3486
3488
  }
3487
3489
 
3488
3490
  export class RFIDConfig {
3489
- onRequestPACertificates?: boolean
3490
- onRequestTACertificates?: boolean
3491
- onRequestTASignature?: boolean
3492
- onRequestPACEProtocol?: boolean
3493
- onRequestCAProtocol?: boolean
3491
+ paCertificates?: boolean
3492
+ taCertificates?: boolean
3493
+ taSignature?: boolean
3494
+ aaChallenge?: boolean
3495
+ paceProtocol?: boolean
3496
+ caProtocol?: boolean
3494
3497
 
3495
3498
  static fromJson(jsonObject?: any): RFIDConfig | undefined {
3496
3499
  if (jsonObject == null || jsonObject == undefined) return undefined
3497
3500
  const result = new RFIDConfig
3498
3501
 
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"]
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"]
3504
3508
 
3505
3509
  return result
3506
3510
  }
@@ -4378,6 +4382,8 @@ export const eCheckDiagnose = {
4378
4382
  CHD_PROPERTY_NO_SIGNATURE: 260,
4379
4383
  CHD_PROPERTY_TEXT_AS_SIGNATURE: 261,
4380
4384
  CHD_PROPERTY_FINGERPRINT_AS_SIGNATURE: 262,
4385
+ CHD_PROPERTY_DOCUMENT_DAMAGED: 263,
4386
+ CHD_PROPERTY_DOCUMENT_CANCELLED: 264,
4381
4387
  }
4382
4388
 
4383
4389
  export const eMDLIntentToRetain = {
@@ -4794,6 +4800,7 @@ export const eRPRM_SecurityFeatureType = {
4794
4800
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
4795
4801
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
4796
4802
  SECURITY_FEATURE_TYPE_SIGNATURE_PRESENCE: 62,
4803
+ SECURITY_FEATURE_TYPE_DAMAGE_CHECK: 63,
4797
4804
  }
4798
4805
 
4799
4806
  export const OnlineMode = {
@@ -5920,6 +5927,8 @@ export const eVisualFieldType = {
5920
5927
  FT_DLCLASSCODE_B3_FROM: 706,
5921
5928
  FT_DLCLASSCODE_B3_TO: 707,
5922
5929
  FT_DLCLASSCODE_B3_NOTES: 708,
5930
+ FT_ADDRESS_POST_OFFICE: 709,
5931
+ FT_ADDRESS_LOT: 710,
5923
5932
  }
5924
5933
 
5925
5934
  export const DocReaderOrientation = {
@@ -6282,6 +6291,7 @@ export default class DocumentReader {
6282
6291
  static providePACertificates(certificates: PKDCertificate[] | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6283
6292
  static provideTACertificates(certificates: PKDCertificate[] | null, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6284
6293
  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
6285
6295
  static selectPACEProtocol(protocol: PACEProtocol, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6286
6296
  static selectCAProtocol(protocol: CAProtocol, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
6287
6297
  static setTCCParams(params: TccParams, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
package/index.js CHANGED
@@ -1503,6 +1503,7 @@ export class AuthenticityPropertiesParams {
1503
1503
  const result = new AuthenticityPropertiesParams()
1504
1504
 
1505
1505
  result.checkHoldersSignature = jsonObject["checkHoldersSignature"]
1506
+ result.checkDocumentDamage = jsonObject["checkDocumentDamage"]
1506
1507
 
1507
1508
  return result
1508
1509
  }
@@ -2272,11 +2273,12 @@ export class RFIDConfig {
2272
2273
  if (jsonObject == null) return null
2273
2274
  const result = new RFIDConfig()
2274
2275
 
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"]
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"]
2280
2282
 
2281
2283
  return result
2282
2284
  }
@@ -3156,6 +3158,8 @@ export const eCheckDiagnose = {
3156
3158
  CHD_PROPERTY_NO_SIGNATURE: 260,
3157
3159
  CHD_PROPERTY_TEXT_AS_SIGNATURE: 261,
3158
3160
  CHD_PROPERTY_FINGERPRINT_AS_SIGNATURE: 262,
3161
+ CHD_PROPERTY_DOCUMENT_DAMAGED: 263,
3162
+ CHD_PROPERTY_DOCUMENT_CANCELLED: 264,
3159
3163
  }
3160
3164
 
3161
3165
  export const eMDLIntentToRetain = {
@@ -3572,6 +3576,7 @@ export const eRPRM_SecurityFeatureType = {
3572
3576
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
3573
3577
  SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
3574
3578
  SECURITY_FEATURE_TYPE_SIGNATURE_PRESENCE: 62,
3579
+ SECURITY_FEATURE_TYPE_DAMAGE_CHECK: 63,
3575
3580
  }
3576
3581
 
3577
3582
  export const OnlineMode = {
@@ -4698,6 +4703,8 @@ export const eVisualFieldType = {
4698
4703
  FT_DLCLASSCODE_B3_FROM: 706,
4699
4704
  FT_DLCLASSCODE_B3_TO: 707,
4700
4705
  FT_DLCLASSCODE_B3_NOTES: 708,
4706
+ FT_ADDRESS_POST_OFFICE: 709,
4707
+ FT_ADDRESS_LOT: 710,
4701
4708
  }
4702
4709
 
4703
4710
  export const DocReaderOrientation = {
@@ -5061,6 +5068,7 @@ DocumentReader.stopRFIDReader = (successCallback, errorCallback) => RNRegulaDocu
5061
5068
  DocumentReader.providePACertificates = (certificates, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "providePACertificates", [certificates], successCallback, errorCallback)
5062
5069
  DocumentReader.provideTACertificates = (certificates, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "provideTACertificates", [certificates], successCallback, errorCallback)
5063
5070
  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)
5064
5072
  DocumentReader.selectPACEProtocol = (protocol, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "selectPACEProtocol", [protocol], successCallback, errorCallback)
5065
5073
  DocumentReader.selectCAProtocol = (protocol, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "selectCAProtocol", [protocol], successCallback, errorCallback)
5066
5074
  DocumentReader.setTCCParams = (params, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "setTCCParams", [params], successCallback, errorCallback)
package/ios/RGLWConfig.m CHANGED
@@ -1102,6 +1102,7 @@
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"];
1105
1106
  }
1106
1107
 
1107
1108
  +(NSDictionary*)getAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams*)input {
@@ -1109,6 +1110,7 @@
1109
1110
  NSMutableDictionary *result = [NSMutableDictionary new];
1110
1111
 
1111
1112
  result[@"checkHoldersSignature"] = input.checkHoldersSignature;
1113
+ result[@"checkDocumentDamage"] = input.checkDocumentDamage;
1112
1114
 
1113
1115
  return result;
1114
1116
  }
@@ -246,6 +246,7 @@ 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"]];
249
250
  if (input[@"livePortrait"]) config.livePortrait = [self imageWithBase64:input[@"livePortrait"]];
250
251
  if (input[@"extPortrait"]) config.extPortrait = [self imageWithBase64:input[@"extPortrait"]];
251
252
  if (input[@"oneShotIdentification"]) config.oneShotIdentification = input[@"oneShotIdentification"];
package/ios/RGLWMain.h CHANGED
@@ -27,6 +27,7 @@ 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";
30
31
  static NSString* _Nonnull paceProtocolCompletionEvent = @"paceProtocolCompletionEvent";
31
32
  static NSString* _Nonnull caProtocolCompletionEvent = @"caProtocolCompletionEvent";
32
33
  static NSString* _Nonnull drVideoEncoderCompletionEvent = @"video_encoder_completion";
package/ios/RGLWMain.m CHANGED
@@ -47,6 +47,7 @@
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]]; },
50
51
  @"selectPACEProtocol": ^{ [self selectPACEProtocol :args[0]]; },
51
52
  @"selectCAProtocol": ^{ [self selectCAProtocol :args[0]]; },
52
53
  @"setTCCParams": ^{ [self setTCCParams :args[0] :callback]; },
@@ -289,6 +290,10 @@ static NSDictionary* headers;
289
290
  taSignatureCompletion([RGLWJSONConstructor base64Decode:signature]);
290
291
  }
291
292
 
293
+ +(void)provideAAChallenge:(NSString*)challenge {
294
+ aaChallengeCompletion(challenge);
295
+ }
296
+
292
297
  +(void)selectPACEProtocol:(NSDictionary*)protocol {
293
298
  paceProtocolCompletion([RGLWJSONConstructor paceProtocolFromJson:protocol]);
294
299
  }
@@ -632,6 +637,7 @@ RGLWCallback savedCallbackForBluetoothResult;
632
637
  RGLRFIDCertificatesCallback paCertificateCompletion;
633
638
  RGLRFIDCertificatesCallback taCertificateCompletion;
634
639
  RGLWRFIDSignatureCallback taSignatureCompletion;
640
+ RGLRFIDAAChallengeCallback aaChallengeCompletion;
635
641
  RGLRFIDAccessControlPACECallback paceProtocolCompletion;
636
642
  RGLRFIDAccessControlCACallback caProtocolCompletion;
637
643
 
@@ -667,6 +673,16 @@ NSDictionary* rfidReaderRequest;
667
673
  }
668
674
  }
669
675
 
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
+
670
686
  - (void)onRequestPACEProtocolWithOptions:(NSArray<RGLRFIDAccessControlPACE*>*)protocols callback:(RGLRFIDAccessControlPACECallback)callback {
671
687
  if ([rfidReaderRequest isKindOfClass:[NSDictionary class]] && [rfidReaderRequest[@"paceProtocol"] boolValue]) {
672
688
  paceProtocolCompletion = callback;
@@ -15,6 +15,7 @@ RCT_EXPORT_MODULE();
15
15
  paCertificateCompletionEvent,
16
16
  taCertificateCompletionEvent,
17
17
  taSignatureCompletionEvent,
18
+ aaChallengeCompletionEvent,
18
19
  paceProtocolCompletionEvent,
19
20
  caProtocolCompletionEvent,
20
21
  drVideoEncoderCompletionEvent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/react-native-document-reader-api",
3
- "version": "9.10.913-rc",
3
+ "version": "9.10.914-rc",
4
4
  "description": "React Native module for reading and validation of identification documents (API framework)",
5
5
  "main": "index.js",
6
6
  "scripts": {