scandit-react-native-datacapture-core 8.4.0 → 8.4.2
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/android/build.gradle +1 -1
- package/android/generated/jni/CMakeLists.txt +21 -1
- package/dist/core.js +6 -0
- package/dist/core.js.map +1 -1
- package/dist/dts/DataCaptureView.d.ts +7 -2
- package/dist/index.js +63 -13
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ios/Sources/Shared/ScanditReactNativeFactoryContainer.swift +11 -3
- package/package.json +2 -2
- package/scandit-react-native-datacapture-core.podspec +6 -3
|
@@ -6,19 +6,27 @@
|
|
|
6
6
|
|
|
7
7
|
import Foundation
|
|
8
8
|
|
|
9
|
+
// Keep importing React_RCTAppDelegate when reachable: it makes the Swift-visible
|
|
10
|
+
// RCTReactNativeFactory type identity match what a consumer AppDelegate sees, so
|
|
11
|
+
// its conformance to this protocol resolves on RN >= 0.78 (SDC-32584).
|
|
9
12
|
#if canImport(React_RCTAppDelegate)
|
|
10
13
|
import React_RCTAppDelegate
|
|
11
14
|
#endif
|
|
12
15
|
|
|
16
|
+
// Gate the RN 0.78+ requirement on RCT_REACT_NATIVE_FACTORY_AVAILABLE (set by the
|
|
17
|
+
// podspec when RN >= 0.78), NOT canImport(React_RCTAppDelegate): that module has
|
|
18
|
+
// existed since RN ~0.71, so canImport is true on RN < 0.78 where RCTReactNativeFactory
|
|
19
|
+
// does not yet exist — which is what broke the build there (SDC-32584).
|
|
20
|
+
|
|
13
21
|
/// Protocol for AppDelegates that expose a React Native factory (RN 0.78+).
|
|
14
22
|
/// Implement this protocol to let the Scandit SDK access your RCTReactNativeFactory
|
|
15
23
|
/// for creating native views from JS components.
|
|
16
24
|
@objc public protocol ScanditReactNativeFactoryContainer {
|
|
17
|
-
#if
|
|
25
|
+
#if RCT_REACT_NATIVE_FACTORY_AVAILABLE
|
|
18
26
|
@objc var reactNativeFactory: RCTReactNativeFactory? { get }
|
|
19
27
|
#else
|
|
20
|
-
// Fallback when
|
|
21
|
-
//
|
|
28
|
+
// Fallback when RCTReactNativeFactory isn't available (RN < 0.78, or the
|
|
29
|
+
// React_RCTAppDelegate module isn't reachable — Expo + static frameworks). SDC-30774.
|
|
22
30
|
@objc var reactNativeFactory: NSObject? { get }
|
|
23
31
|
#endif
|
|
24
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scandit-react-native-datacapture-core",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.2",
|
|
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",
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"scandit-datacapture-frameworks-core": "8.4.
|
|
87
|
+
"scandit-datacapture-frameworks-core": "8.4.2"
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -52,7 +52,9 @@ Pod::Spec.new do |s|
|
|
|
52
52
|
s.source_files = "ios/Sources/**/*.{h,m,mm,swift}", "ios/generated/**/*.{h,m,mm,cpp}"
|
|
53
53
|
s.private_header_files = "ios/generated/**/*.h"
|
|
54
54
|
s.exclude_files = "ios/Sources/OldArch/**/*"
|
|
55
|
-
|
|
55
|
+
# RCTReactNativeFactory (the only consumer) exists only on RN >= 0.78; on older
|
|
56
|
+
# RN this pod is absent and the code uses the NSObject fallback. SDC-32584.
|
|
57
|
+
s.dependency "React-RCTAppDelegate" if is_factory_available
|
|
56
58
|
|
|
57
59
|
swift_flags = ['-DRCT_NEW_ARCH_ENABLED']
|
|
58
60
|
if is_factory_available
|
|
@@ -66,7 +68,8 @@ Pod::Spec.new do |s|
|
|
|
66
68
|
else
|
|
67
69
|
s.source_files = "ios/Sources/**/*.{h,m,mm,swift}"
|
|
68
70
|
s.exclude_files = "ios/Sources/NewArch/**/*"
|
|
69
|
-
|
|
71
|
+
# See note above: gate the dependency on RN >= 0.78. SDC-32584.
|
|
72
|
+
s.dependency "React-RCTAppDelegate" if is_factory_available
|
|
70
73
|
|
|
71
74
|
swift_flags = []
|
|
72
75
|
if is_factory_available
|
|
@@ -80,7 +83,7 @@ Pod::Spec.new do |s|
|
|
|
80
83
|
end
|
|
81
84
|
end
|
|
82
85
|
|
|
83
|
-
s.dependency "scandit-datacapture-frameworks-core", '= 8.4.
|
|
86
|
+
s.dependency "scandit-datacapture-frameworks-core", '= 8.4.2'
|
|
84
87
|
|
|
85
88
|
if respond_to?(:install_modules_dependencies, true)
|
|
86
89
|
install_modules_dependencies(s)
|