scandit-react-native-datacapture-core 8.3.1 → 8.4.0-beta.1
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.
- package/README.md +13 -0
- package/android/build.gradle +3 -3
- package/dist/core.js +378 -83
- package/dist/core.js.map +1 -1
- package/dist/dts/DataCaptureView.d.ts +4 -0
- package/dist/dts/index.d.ts +3 -0
- package/dist/index.js +10 -2
- package/dist/index.js.flow +3 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/NewArch/RCTDataCaptureView.mm +4 -0
- package/ios/Sources/NewArch/ScanditDataCaptureCore.mm +4 -0
- package/ios/Sources/OldArch/ScanditDataCaptureCore.mm +4 -0
- package/ios/Sources/ScanditDataCaptureCore-Bridging-Header.h +9 -0
- package/ios/Sources/ScanditDataCaptureCore.swift +1 -0
- package/ios/Sources/Shared/ScanditReactNativeFactoryContainer.swift +12 -10
- package/package.json +8 -8
- package/scandit-react-native-datacapture-core.podspec +1 -1
|
@@ -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
|
|
@@ -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
|
|
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
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
var reactNativeFactory:
|
|
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
|
+
"version": "8.4.0-beta.1",
|
|
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.
|
|
55
|
-
"@rollup/plugin-commonjs": "
|
|
56
|
-
"@rollup/plugin-node-resolve": "15.
|
|
57
|
-
"@rollup/plugin-typescript": "11.1.
|
|
58
|
-
"@types/react": "19.
|
|
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.
|
|
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.
|
|
87
|
+
"scandit-datacapture-frameworks-core": "8.4.0-beta.1"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -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.
|
|
83
|
+
s.dependency "scandit-datacapture-frameworks-core", '= 8.4.0-beta.1'
|
|
84
84
|
|
|
85
85
|
if respond_to?(:install_modules_dependencies, true)
|
|
86
86
|
install_modules_dependencies(s)
|