File tree Expand file tree Collapse file tree 4 files changed +18
-8
lines changed
react-native/Libraries/AppDelegate Expand file tree Collapse file tree 4 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1414#import " RCTLegacyInteropComponents.h"
1515
1616#if RCT_NEW_ARCH_ENABLED
17+ #if RN_DISABLE_OSS_PLUGIN_HEADER
18+ #import < RCTTurboModulePlugin/RCTTurboModulePlugin.h>
19+ #else
1720#import < React/CoreModulesPlugins.h>
21+ #endif
1822#import < React/RCTBundleURLProvider.h>
1923#import < React/RCTComponentViewFactory.h>
2024#import < React/RCTComponentViewProtocol.h>
@@ -219,7 +223,11 @@ - (void)windowScene:(UIWindowScene *)windowScene
219223
220224- (Class )getModuleClassFromName : (const char *)name
221225{
226+ #if RN_DISABLE_OSS_PLUGIN_HEADER
227+ return RCTTurboModulePluginClassProvider (name);
228+ #else
222229 return RCTCoreModulesClassProvider (name);
230+ #endif
223231}
224232
225233- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule : (const std::string &)name
Original file line number Diff line number Diff line change 1414#import < memory>
1515
1616#ifndef RCT_USE_HERMES
17- #if __has_include(<reacthermes/HermesExecutorFactory.h>)
17+ #if __has_include(<jsireact/HermesExecutorFactory.h>)
18+ #import < jsireact/HermesExecutorFactory.h>
1819#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>)
2521#import < reacthermes/HermesExecutorFactory.h>
22+ #define RCT_USE_HERMES 1
2623#else
2724#import < React/JSCExecutorFactory.h>
25+ #define RCT_USE_HERMES 0
26+ #endif
2827#endif
2928
3029#if RCT_NEW_ARCH_ENABLED
Original file line number Diff line number Diff line change 1313
1414#if RCT_NEW_ARCH_ENABLED
1515// Turbo Module
16- #import < React/CoreModulesPlugins.h>
1716#import < React/RCTBundleAssetImageLoader.h>
1817#import < React/RCTDataRequestHandler.h>
1918#import < React/RCTFileRequestHandler.h>
Original file line number Diff line number Diff line change 1818
1919#if RCT_NEW_ARCH_ENABLED
2020#import < NativeCxxModuleExample/NativeCxxModuleExample.h>
21+ #ifndef RN_DISABLE_OSS_PLUGIN_HEADER
2122#import < RNTMyNativeViewComponentView.h>
2223#endif
24+ #endif
2325
2426#if BUNDLE_PATH
2527NSString *kBundlePath = @" xplat/js/RKJSModules/EntryPoints/RNTesterTestBundle.js" ;
@@ -125,10 +127,12 @@ - (void)application:(__unused UIApplication *)application
125127#pragma mark - RCTComponentViewFactoryComponentProvider
126128
127129#if RCT_NEW_ARCH_ENABLED
130+ #ifndef RN_DISABLE_OSS_PLUGIN_HEADER
128131- (nonnull NSDictionary <NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
129132{
130133 return @{@" RNTMyNativeView" : RNTMyNativeViewComponentView.class };
131134}
135+ #endif
132136
133137- (NSURL *)getBundleURL
134138{
You can’t perform that action at this time.
0 commit comments