@rnx-kit/react-native-host 0.5.10 → 0.5.12
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/cocoa/RNXFeatureMacros.h
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
// Force enable Hermes if JSC is not available
|
|
1
2
|
#if !__has_include(<ReactCommon/RCTJscInstance.h>)
|
|
2
3
|
#ifdef USE_HERMES
|
|
3
4
|
#undef USE_HERMES
|
|
4
|
-
#endif //
|
|
5
|
+
#endif // USE_HERMES
|
|
5
6
|
#define USE_HERMES 1
|
|
6
7
|
#endif // !__has_include(<ReactCommon/RCTJscInstance.h>)
|
|
7
8
|
|
|
9
|
+
// Force enable bridgeless mode if New Architecture is enabled and requires it
|
|
10
|
+
#if USE_FABRIC && !__has_include(<react/config/ReactNativeConfig.h>)
|
|
11
|
+
#ifdef USE_BRIDGELESS
|
|
12
|
+
#undef USE_BRIDGELESS
|
|
13
|
+
#endif // USE_BRIDGELESS
|
|
14
|
+
#define USE_BRIDGELESS 1
|
|
15
|
+
#endif // USE_FABRIC && !__has_include(<react/config/ReactNativeConfig.h>)
|
|
16
|
+
|
|
8
17
|
#if USE_BRIDGELESS
|
|
9
18
|
|
|
10
19
|
#if __has_include(<react/config/ReactNativeConfig.h>)
|
|
@@ -48,6 +48,13 @@
|
|
|
48
48
|
#import <react/nativemodule/defaults/DefaultTurboModules.h>
|
|
49
49
|
#endif
|
|
50
50
|
|
|
51
|
+
#if __has_include(<ReactAppDependencyProvider/RCTAppDependencyProvider.h>)
|
|
52
|
+
#import <ReactAppDependencyProvider/RCTAppDependencyProvider.h>
|
|
53
|
+
#define USE_OSS_CODEGEN 1
|
|
54
|
+
#else
|
|
55
|
+
#define USE_OSS_CODEGEN 0
|
|
56
|
+
#endif // __has_include(<ReactAppDependencyProvider/RCTAppDependencyProvider.h>)
|
|
57
|
+
|
|
51
58
|
#endif // USE_FABRIC
|
|
52
59
|
|
|
53
60
|
@implementation RNXTurboModuleAdapter {
|
|
@@ -113,11 +120,13 @@
|
|
|
113
120
|
|
|
114
121
|
- (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
|
|
115
122
|
{
|
|
116
|
-
#if
|
|
123
|
+
#if USE_OSS_CODEGEN
|
|
124
|
+
return RCTAppSetupDefaultModuleFromClass(moduleClass, [RCTAppDependencyProvider new]);
|
|
125
|
+
#elif __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>) || __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
|
|
117
126
|
return RCTAppSetupDefaultModuleFromClass(moduleClass, nil);
|
|
118
127
|
#else
|
|
119
128
|
return RCTAppSetupDefaultModuleFromClass(moduleClass);
|
|
120
|
-
#endif //
|
|
129
|
+
#endif // USE_OSS_CODEGEN
|
|
121
130
|
}
|
|
122
131
|
|
|
123
132
|
// MARK: - Private
|
package/cocoa/ReactNativeHost.mm
CHANGED
package/package.json
CHANGED