@rnx-kit/react-native-host 0.3.2 → 0.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.
package/ReactNativeHost.podspec
CHANGED
|
@@ -8,7 +8,7 @@ version = package['version']
|
|
|
8
8
|
repository = package['repository']
|
|
9
9
|
repo_dir = repository['directory']
|
|
10
10
|
|
|
11
|
-
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
11
|
+
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
12
12
|
preprocessor_definitions = [
|
|
13
13
|
'FOLLY_CFG_NO_COROUTINES=1',
|
|
14
14
|
'FOLLY_HAVE_CLOCK_GETTIME=1',
|
|
@@ -20,7 +20,6 @@ preprocessor_definitions = [
|
|
|
20
20
|
if new_arch_enabled
|
|
21
21
|
preprocessor_definitions << 'RCT_NEW_ARCH_ENABLED=1'
|
|
22
22
|
preprocessor_definitions << 'USE_FABRIC=1'
|
|
23
|
-
preprocessor_definitions << 'USE_TURBOMODULE=1'
|
|
24
23
|
end
|
|
25
24
|
|
|
26
25
|
Pod::Spec.new do |s|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
#import <Foundation/Foundation.h>
|
|
4
4
|
|
|
5
|
-
#if
|
|
5
|
+
#if USE_FABRIC
|
|
6
6
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
7
|
-
#endif //
|
|
7
|
+
#endif // USE_FABRIC
|
|
8
8
|
|
|
9
9
|
@class RCTBridge;
|
|
10
10
|
|
|
@@ -15,11 +15,11 @@ namespace facebook::react
|
|
|
15
15
|
|
|
16
16
|
NS_ASSUME_NONNULL_BEGIN
|
|
17
17
|
|
|
18
|
-
#if
|
|
18
|
+
#if USE_FABRIC
|
|
19
19
|
@interface RNXTurboModuleAdapter : NSObject <RCTTurboModuleManagerDelegate>
|
|
20
20
|
#else
|
|
21
21
|
@interface RNXTurboModuleAdapter : NSObject
|
|
22
|
-
#endif //
|
|
22
|
+
#endif // USE_FABRIC
|
|
23
23
|
|
|
24
24
|
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:
|
|
25
25
|
(RCTBridge *)bridge;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
#import <cxxreact/JSExecutor.h>
|
|
7
7
|
#pragma clang diagnostic pop
|
|
8
8
|
|
|
9
|
-
#if
|
|
9
|
+
#if USE_FABRIC
|
|
10
10
|
#import <React/CoreModulesPlugins.h>
|
|
11
11
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
12
12
|
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
|
|
36
36
|
#endif // __has_include(<React/RCTAppSetupUtils.h>)
|
|
37
37
|
|
|
38
|
-
#endif //
|
|
38
|
+
#endif // USE_FABRIC
|
|
39
39
|
|
|
40
40
|
@implementation RNXTurboModuleAdapter {
|
|
41
|
-
#if
|
|
41
|
+
#if USE_FABRIC
|
|
42
42
|
RCTTurboModuleManager *_turboModuleManager;
|
|
43
|
-
#endif //
|
|
43
|
+
#endif // USE_FABRIC
|
|
44
44
|
#if USE_RUNTIME_SCHEDULER
|
|
45
45
|
std::shared_ptr<facebook::react::RuntimeScheduler> _runtimeScheduler;
|
|
46
46
|
#endif // USE_RUNTIME_SCHEDULER
|
|
@@ -49,21 +49,21 @@
|
|
|
49
49
|
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:
|
|
50
50
|
(RCTBridge *)bridge
|
|
51
51
|
{
|
|
52
|
-
#if
|
|
52
|
+
#if USE_FABRIC
|
|
53
53
|
#if MANUALLY_REGISTER_LEGACY_COMPONENTS
|
|
54
54
|
for (NSString *legacyComponent in [RCTLegacyInteropComponents legacyInteropComponents]) {
|
|
55
55
|
[RCTLegacyViewManagerInteropComponentView supportLegacyViewManagerWithName:legacyComponent];
|
|
56
56
|
}
|
|
57
57
|
#endif // MANUALLY_REGISTER_LEGACY_COMPONENTS
|
|
58
|
-
// jsExecutorFactoryForBridge: (
|
|
58
|
+
// jsExecutorFactoryForBridge: (USE_FABRIC=1)
|
|
59
59
|
return [self initJsExecutorFactoryWithBridge:bridge];
|
|
60
60
|
#else
|
|
61
|
-
// jsExecutorFactoryForBridge: (
|
|
61
|
+
// jsExecutorFactoryForBridge: (USE_FABRIC=0)
|
|
62
62
|
return nullptr;
|
|
63
|
-
#endif //
|
|
63
|
+
#endif // USE_FABRIC
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
#if
|
|
66
|
+
#if USE_FABRIC
|
|
67
67
|
|
|
68
68
|
// MARK: - RCTTurboModuleManagerDelegate details
|
|
69
69
|
|
|
@@ -106,6 +106,6 @@
|
|
|
106
106
|
#endif // USE_RUNTIME_SCHEDULER
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
#endif //
|
|
109
|
+
#endif // USE_FABRIC
|
|
110
110
|
|
|
111
111
|
@end
|
package/cocoa/ReactNativeHost.mm
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
_config = config;
|
|
56
|
-
#if USE_FABRIC
|
|
56
|
+
#if USE_FABRIC
|
|
57
57
|
_turboModuleAdapter = [[RNXTurboModuleAdapter alloc] init];
|
|
58
58
|
#endif
|
|
59
59
|
_isShuttingDown = [[NSLock alloc] init];
|
|
@@ -144,13 +144,13 @@
|
|
|
144
144
|
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:
|
|
145
145
|
(RCTBridge *)bridge
|
|
146
146
|
{
|
|
147
|
-
#if
|
|
148
|
-
// jsExecutorFactoryForBridge: (
|
|
147
|
+
#if USE_FABRIC
|
|
148
|
+
// jsExecutorFactoryForBridge: (USE_FABRIC=1)
|
|
149
149
|
return [_turboModuleAdapter jsExecutorFactoryForBridge:bridge];
|
|
150
150
|
#else
|
|
151
|
-
// jsExecutorFactoryForBridge: (
|
|
151
|
+
// jsExecutorFactoryForBridge: (USE_FABRIC=0)
|
|
152
152
|
return nullptr;
|
|
153
|
-
#endif //
|
|
153
|
+
#endif // USE_FABRIC
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
// MARK: - Private
|
package/package.json
CHANGED