File tree 4 files changed +18
-8
lines changed
react-native/Libraries/AppDelegate
4 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 14
14
#import " RCTLegacyInteropComponents.h"
15
15
16
16
#if RCT_NEW_ARCH_ENABLED
17
+ #if RN_DISABLE_OSS_PLUGIN_HEADER
18
+ #import < RCTTurboModulePlugin/RCTTurboModulePlugin.h>
19
+ #else
17
20
#import < React/CoreModulesPlugins.h>
21
+ #endif
18
22
#import < React/RCTBundleURLProvider.h>
19
23
#import < React/RCTComponentViewFactory.h>
20
24
#import < React/RCTComponentViewProtocol.h>
@@ -219,7 +223,11 @@ - (void)windowScene:(UIWindowScene *)windowScene
219
223
220
224
- (Class )getModuleClassFromName : (const char *)name
221
225
{
226
+ #if RN_DISABLE_OSS_PLUGIN_HEADER
227
+ return RCTTurboModulePluginClassProvider (name);
228
+ #else
222
229
return RCTCoreModulesClassProvider (name);
230
+ #endif
223
231
}
224
232
225
233
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule : (const std::string &)name
Original file line number Diff line number Diff line change 14
14
#import < memory>
15
15
16
16
#ifndef RCT_USE_HERMES
17
- #if __has_include(<reacthermes/HermesExecutorFactory.h>)
17
+ #if __has_include(<jsireact/HermesExecutorFactory.h>)
18
+ #import < jsireact/HermesExecutorFactory.h>
18
19
#define RCT_USE_HERMES 1
19
- #else
20
- #define RCT_USE_HERMES 0
21
- #endif
22
- #endif
23
-
24
- #if RCT_USE_HERMES
20
+ #elif __has_include(<reacthermes/HermesExecutorFactory.h>)
25
21
#import < reacthermes/HermesExecutorFactory.h>
22
+ #define RCT_USE_HERMES 1
26
23
#else
27
24
#import < React/JSCExecutorFactory.h>
25
+ #define RCT_USE_HERMES 0
26
+ #endif
28
27
#endif
29
28
30
29
#if RCT_NEW_ARCH_ENABLED
Original file line number Diff line number Diff line change 13
13
14
14
#if RCT_NEW_ARCH_ENABLED
15
15
// Turbo Module
16
- #import < React/CoreModulesPlugins.h>
17
16
#import < React/RCTBundleAssetImageLoader.h>
18
17
#import < React/RCTDataRequestHandler.h>
19
18
#import < React/RCTFileRequestHandler.h>
Original file line number Diff line number Diff line change 18
18
19
19
#if RCT_NEW_ARCH_ENABLED
20
20
#import < NativeCxxModuleExample/NativeCxxModuleExample.h>
21
+ #ifndef RN_DISABLE_OSS_PLUGIN_HEADER
21
22
#import < RNTMyNativeViewComponentView.h>
22
23
#endif
24
+ #endif
23
25
24
26
#if BUNDLE_PATH
25
27
NSString *kBundlePath = @" xplat/js/RKJSModules/EntryPoints/RNTesterTestBundle.js" ;
@@ -125,10 +127,12 @@ - (void)application:(__unused UIApplication *)application
125
127
#pragma mark - RCTComponentViewFactoryComponentProvider
126
128
127
129
#if RCT_NEW_ARCH_ENABLED
130
+ #ifndef RN_DISABLE_OSS_PLUGIN_HEADER
128
131
- (nonnull NSDictionary <NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
129
132
{
130
133
return @{@" RNTMyNativeView" : RNTMyNativeViewComponentView.class };
131
134
}
135
+ #endif
132
136
133
137
- (NSURL *)getBundleURL
134
138
{
You can’t perform that action at this time.
0 commit comments