scandit-react-native-datacapture-id 8.5.0-beta.1 → 8.5.0

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.
@@ -103,7 +103,7 @@ if (file( "${rootProject.projectDir}/build-test.gradle").exists()) {
103
103
  }
104
104
 
105
105
  dependencies {
106
- def sdk_version = "8.5.0-beta.1"
106
+ def sdk_version = "8.5.0"
107
107
 
108
108
  println("Version of the native sdk used in this build: ${safeExtGet("frameworks_sdk_version", sdk_version)}")
109
109
  api project(path: ":scandit-react-native-datacapture-core")
@@ -25,5 +25,25 @@ target_link_libraries(
25
25
  reactnative
26
26
  )
27
27
 
28
- target_compile_reactnative_options(react_codegen_ScanditReactNativeDatacaptureIdSpec PRIVATE)
28
+ # target_compile_reactnative_options ships with React Native 0.81+. On older
29
+ # RN (e.g. 0.78 with New Architecture) the macro is undefined and configure
30
+ # fails with "Unknown CMake command". Guard it and fall back to the equivalent
31
+ # flags the helper sets, including RN_SERIALIZABLE_STATE on Android (required
32
+ # for correct Fabric memory layout in Release builds).
33
+ if(COMMAND target_compile_reactnative_options)
34
+ target_compile_reactnative_options(react_codegen_ScanditReactNativeDatacaptureIdSpec PRIVATE)
35
+ else()
36
+ target_compile_options(
37
+ react_codegen_ScanditReactNativeDatacaptureIdSpec
38
+ PRIVATE
39
+ -DLOG_TAG=\"ReactNative\"
40
+ -fexceptions
41
+ -frtti
42
+ -std=c++20
43
+ -Wall
44
+ )
45
+ if(ANDROID)
46
+ target_compile_definitions(react_codegen_ScanditReactNativeDatacaptureIdSpec PRIVATE RN_SERIALIZABLE_STATE)
47
+ endif()
48
+ endif()
29
49
  target_compile_options(react_codegen_ScanditReactNativeDatacaptureIdSpec PRIVATE -Wno-deprecated-declarations)
package/dist/id.js CHANGED
@@ -2464,10 +2464,10 @@ class IdCapture extends DefaultSerializeable {
2464
2464
  if (this.listeners.includes(listener)) {
2465
2465
  return;
2466
2466
  }
2467
- this.listeners.push(listener);
2468
2467
  if (this.listeners.length === 0) {
2469
2468
  yield ((_a = this.listenerController) === null || _a === void 0 ? void 0 : _a.subscribeListener());
2470
2469
  }
2470
+ this.listeners.push(listener);
2471
2471
  this._hasListeners = this.listeners.length > 0;
2472
2472
  });
2473
2473
  }