scandit-react-native-datacapture-core 8.3.1 → 8.4.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.
@@ -5,7 +5,11 @@
5
5
  */
6
6
 
7
7
  #import "ScanditDataCaptureCore.h"
8
+ #if __has_include(<ScanditDataCaptureCore/ScanditDataCaptureCore-Swift.h>)
9
+ #import <ScanditDataCaptureCore/ScanditDataCaptureCore-Swift.h>
10
+ #else
8
11
  #import "ScanditDataCaptureCore-Swift.h"
12
+ #endif
9
13
 
10
14
  #import <React/RCTViewComponentView.h>
11
15
  #import <React/RCTFabricComponentsPlugins.h>
@@ -9,7 +9,11 @@
9
9
  #import <ScanditReactNativeDatacaptureCoreSpec/ScanditReactNativeDatacaptureCoreSpec.h>
10
10
  #import <ReactCommon/RCTTurboModule.h>
11
11
  #import "ScanditDataCaptureCore.h"
12
+ #if __has_include(<ScanditDataCaptureCore/ScanditDataCaptureCore-Swift.h>)
13
+ #import <ScanditDataCaptureCore/ScanditDataCaptureCore-Swift.h>
14
+ #else
12
15
  #import "ScanditDataCaptureCore-Swift.h"
16
+ #endif
13
17
  #import "SDCTurboModuleEventBridge.h"
14
18
 
15
19
  /// New Architecture (TurboModule/Fabric) adapter for the Core native module.
@@ -7,7 +7,11 @@
7
7
  #import <React/RCTEventEmitter.h>
8
8
  #import <React/RCTBridgeModule.h>
9
9
  #import "ScanditDataCaptureCore.h"
10
+ #if __has_include(<ScanditDataCaptureCore/ScanditDataCaptureCore-Swift.h>)
11
+ #import <ScanditDataCaptureCore/ScanditDataCaptureCore-Swift.h>
12
+ #else
10
13
  #import "ScanditDataCaptureCore-Swift.h"
14
+ #endif
11
15
  #import "SDCTurboModuleEventBridge.h"
12
16
 
13
17
  /// Old Architecture (Paper/Bridge) adapter for the Core native module.
@@ -14,3 +14,12 @@
14
14
  #import <React/RCTLog.h>
15
15
  #import "SDCDataCaptureView+Defaults.h"
16
16
  #import "RCTEventEmitter+Private.h"
17
+
18
+ // SDC-30774: bridge `RCTReactNativeFactory` instead of `import React_RCTAppDelegate`
19
+ // to cover the prebuilt React.xcframework path (RN ≥ 0.83 / Expo static), where
20
+ // the Swift module is shadowed by Expo's generated React-use-frameworks.modulemap.
21
+ #if __has_include(<React-RCTAppDelegate/RCTReactNativeFactory.h>)
22
+ # import <React-RCTAppDelegate/RCTReactNativeFactory.h>
23
+ #elif __has_include(<React_RCTAppDelegate/RCTReactNativeFactory.h>)
24
+ # import <React_RCTAppDelegate/RCTReactNativeFactory.h>
25
+ #endif
@@ -7,6 +7,7 @@
7
7
  import Foundation
8
8
  import React
9
9
  import ScanditCaptureCore
10
+ import ScanditCaptureCoreDeserializer
10
11
  import ScanditFrameworksCore
11
12
 
12
13
  public let sdcSharedMethodQueue = DispatchQueue(
@@ -4,19 +4,21 @@
4
4
  * Copyright (C) 2026- Scandit AG. All rights reserved.
5
5
  */
6
6
 
7
+ import Foundation
8
+
9
+ #if canImport(React_RCTAppDelegate)
7
10
  import React_RCTAppDelegate
11
+ #endif
8
12
 
9
- /// Protocol for AppDelegates that expose a React Native factory (RN 0.78+)
10
- /// Implement this protocol to allow Scandit SDK to access your RCTReactNativeFactory
13
+ /// Protocol for AppDelegates that expose a React Native factory (RN 0.78+).
14
+ /// Implement this protocol to let the Scandit SDK access your RCTReactNativeFactory
11
15
  /// for creating native views from JS components.
12
- public protocol ScanditReactNativeFactoryContainer {
13
- #if RCT_REACT_NATIVE_FACTORY_AVAILABLE
14
- /// The React Native factory object (RN 0.78+)
15
- /// Return your RCTReactNativeFactory instance here.
16
- var reactNativeFactory: RCTReactNativeFactory? { get }
16
+ @objc public protocol ScanditReactNativeFactoryContainer {
17
+ #if canImport(React_RCTAppDelegate)
18
+ @objc var reactNativeFactory: RCTReactNativeFactory? { get }
17
19
  #else
18
- /// The React Native factory object.
19
- /// For RN versions before 0.78, return the object that has a `rootViewFactory` property.
20
- var reactNativeFactory: AnyObject? { get }
20
+ // Fallback when the React_RCTAppDelegate Swift module isn't reachable
21
+ // (Expo + static frameworks). SDC-30774.
22
+ @objc var reactNativeFactory: NSObject? { get }
21
23
  #endif
22
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scandit-react-native-datacapture-core",
3
- "version": "8.3.1",
3
+ "version": "8.4.0",
4
4
  "description": "Scandit Data Capture SDK for React Native",
5
5
  "homepage": "https://github.com/Scandit/scandit-react-native-datacapture-core",
6
6
  "main": "dist/index.js",
@@ -51,15 +51,15 @@
51
51
  "@babel/preset-typescript": "^7.27.1",
52
52
  "@babel/runtime": "^7.27.1",
53
53
  "@jest/globals": "^29.7.0",
54
- "@react-native/babel-preset": "^0.79.2",
55
- "@rollup/plugin-commonjs": "24.1.0",
56
- "@rollup/plugin-node-resolve": "15.0.2",
57
- "@rollup/plugin-typescript": "11.1.0",
58
- "@types/react": "19.1.4",
54
+ "@react-native/babel-preset": "^0.84.0",
55
+ "@rollup/plugin-commonjs": "25.0.4",
56
+ "@rollup/plugin-node-resolve": "15.2.1",
57
+ "@rollup/plugin-typescript": "11.1.3",
58
+ "@types/react": "^19.2.3",
59
59
  "babel-jest": "^29.7.0",
60
60
  "flowgen": "^1.21.0",
61
61
  "jest": "^29.7.0",
62
- "rollup": "3.22.0",
62
+ "rollup": "3.29.2",
63
63
  "ts-jest": "^29.3.3",
64
64
  "typescript": "4.9.5"
65
65
  },
@@ -84,6 +84,6 @@
84
84
  }
85
85
  },
86
86
  "dependencies": {
87
- "scandit-datacapture-frameworks-core": "8.3.1"
87
+ "scandit-datacapture-frameworks-core": "8.4.0"
88
88
  }
89
89
  }
@@ -61,7 +61,7 @@ Pod::Spec.new do |s|
61
61
 
62
62
  s.pod_target_xcconfig = {
63
63
  'OTHER_SWIFT_FLAGS' => swift_flags.join(' '),
64
- 'HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)/ios/generated"'
64
+ 'HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)/ios/generated" "$(OBJROOT)/Pods.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(TARGET_NAME).build/Objects-normal/$(CURRENT_ARCH)" "$(OBJROOT)/Pods.build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/$(TARGET_NAME).build/DerivedSources"'
65
65
  }
66
66
  else
67
67
  s.source_files = "ios/Sources/**/*.{h,m,mm,swift}"
@@ -80,7 +80,7 @@ Pod::Spec.new do |s|
80
80
  end
81
81
  end
82
82
 
83
- s.dependency "scandit-datacapture-frameworks-core", '= 8.3.1'
83
+ s.dependency "scandit-datacapture-frameworks-core", '= 8.4.0'
84
84
 
85
85
  if respond_to?(:install_modules_dependencies, true)
86
86
  install_modules_dependencies(s)