Skip to content

Commit

Permalink
Rename the new architecture flag to RCT_NEW_ARCH_ENABLED
Browse files Browse the repository at this point in the history
Summary: Changelog: [internal] Changed teh new architecture flag in the new app template to RCT_NEW_ARCH_ENABLED

Reviewed By: philIip

Differential Revision: D33083694

fbshipit-source-id: f2cc6c564c724b4ebed7b465a533464b6717ac27
  • Loading branch information
sota000 authored and facebook-github-bot committed Dec 16, 2021
1 parent 2e9a376 commit c0c5439
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions React/AppSetup/RCTAppSetupUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <React/RCTBridge.h>
#import <React/RCTRootView.h>

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED

#ifndef RCT_USE_HERMES
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
Expand All @@ -34,7 +34,7 @@
moduleName:(NSString *_Nonnull)moduleName
initialProperties:(nullable NSDictionary *)initialProperties;

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED
+ (id<RCTTurboModule> _Nonnull)defaultModuleInstanceFromClass:(Class _Nonnull)moduleClass;
+ (std::unique_ptr<facebook::react::JSExecutorFactory>)
defaultJsExecutorFactoryForBridge:(RCTBridge *_Nonnull)bridge
Expand Down
8 changes: 4 additions & 4 deletions React/AppSetup/RCTAppSetupUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import "RCTAppSetupUtils.h"

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED
// Turbo Module
#import <React/CoreModulesPlugins.h>
#import <React/RCTDataRequestHandler.h>
Expand Down Expand Up @@ -52,7 +52,7 @@ + (void)prepareApp:(UIApplication *)application
InitializeFlipper(application);
#endif

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED
RCTEnableTurboModule(YES);
#endif
}
Expand All @@ -61,7 +61,7 @@ + (UIView *)defaultRootViewWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
{
#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED
return [[RCTFabricSurfaceHostingProxyRootView alloc] initWithBridge:bridge
moduleName:moduleName
initialProperties:initialProperties];
Expand All @@ -70,7 +70,7 @@ + (UIView *)defaultRootViewWithBridge:(RCTBridge *)bridge
#endif
}

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED
+ (id<RCTTurboModule>)defaultModuleInstanceFromClass:(Class)moduleClass
{
// Set up the default RCTImageLoader and RCTNetworking modules.
Expand Down
6 changes: 3 additions & 3 deletions template/ios/HelloWorld/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#import <React/RCTAppSetupUtils.h>

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED
#import <React/CoreModulesPlugins.h>
#import <React/RCTCxxBridgeDelegate.h>
#import <ReactCommon/RCTTurboModuleManager.h>
Expand All @@ -33,7 +33,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED
_contextContainer = std::make_shared<facebook::react::ContextContainer const>();
_reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
Expand Down Expand Up @@ -68,7 +68,7 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
#endif
}

#if RCT_TM_FABRIC_ENABLED
#if RCT_NEW_ARCH_ENABLED

#pragma mark - RCTCxxBridgeDelegate

Expand Down

0 comments on commit c0c5439

Please sign in to comment.