From a7f5e2d050d96a87e1f3cea9e1056da044cdf915 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 11 Sep 2026 17:47:01 -0700 Subject: [PATCH 1/2] Remove Fabric and TurboModule dead config (#58434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Follow-up to D116318829, addressing rubennorte's review comment. Fabric and TurboModules shipped before bridgeless and are always on, so the toggles for them were hardcoded and read nowhere. Android, `DefaultNewArchitectureEntryPoint` — now only selects the release channel and loads the SO: - removed `fabricEnabled`, `turboModulesEnabled`, `concurrentReactEnabled` - removed the deprecated `load(turboModulesEnabled)` and `load(turboModulesEnabled, fabricEnabled)` overloads - removed `isConfigurationValid`, and with it `DefaultNewArchitectureEntryPointTest` (every test targeted it) - updated the 8 in-repo call sites that passed `fabricEnabled` into the deprecated 3-arg `DefaultReactActivityDelegate` constructor, which discarded it iOS: - removed `fabricEnabled` / `turboModuleEnabled` from `RCTRootViewFactoryConfiguration` - removed the corresponding `RCTDefaultReactNativeFactoryDelegate` stubs and the `RCTAppDelegate.h` doc references `ReactAndroid.api` and the `ReactApple*Cxx.api` snapshots are regenerated. One call site is not updated here: `users/zh/zhaogang/benchmarks/SimpleRN/android/app/src/main/java/com/simplern/MainActivity.kt` still imports `DefaultNewArchitectureEntryPoint.fabricEnabled`. It is a personal benchmark app under `users/` that is not materialized in this working copy, so it could not be edited. Changelog: [General][Breaking] - Remove the `fabricEnabled` / `turboModulesEnabled` / `concurrentReactEnabled` accessors and remaining deprecated `load` overloads from `DefaultNewArchitectureEntryPoint`, and the `fabricEnabled` / `turboModuleEnabled` properties from `RCTRootViewFactoryConfiguration`; Fabric and TurboModules are always enabled https://www.internalfb.com/agent-home?session_id=dmh-2bfbb113-43fc-4bc4-819d-874c5101a1c8 Differential Revision: D119380472 --- .../Libraries/AppDelegate/RCTAppDelegate.h | 2 -- .../RCTDefaultReactNativeFactoryDelegate.mm | 10 ---------- .../Libraries/AppDelegate/RCTRootViewFactory.h | 6 ------ .../Libraries/AppDelegate/RCTRootViewFactory.mm | 2 -- scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api | 2 -- scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api | 2 -- scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api | 2 -- 7 files changed, 26 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h index 4a4eb3fa1756..1dc6adb18c64 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.h @@ -47,8 +47,6 @@ NS_ASSUME_NONNULL_BEGIN * - (UIViewController *)createRootViewController; * - (void)setRootView:(UIView *)rootView toRootViewController:(UIViewController *)rootViewController; * New Architecture: - * - (BOOL)turboModuleEnabled; - * - (BOOL)fabricEnabled; * - (NSDictionary *)prepareInitialProps * - (Class)getModuleClassFromName:(const char *)name * - (std::shared_ptr)getTurboModule:(const std::string &)name diff --git a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm index e502a42a0262..d94631a23d82 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm @@ -116,16 +116,6 @@ - (BOOL)newArchEnabled return YES; } -- (BOOL)fabricEnabled -{ - return YES; -} - -- (BOOL)turboModuleEnabled -{ - return YES; -} - - (Class)getModuleClassFromName:(const char *)name { return nullptr; diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h index 67517de0700b..000963c81e1a 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h @@ -43,12 +43,6 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc #pragma mark - RCTRootViewFactory Configuration @interface RCTRootViewFactoryConfiguration : NSObject -/// This property controls whether the App will use the Fabric renderer of the New Architecture or not. -@property (nonatomic, assign, readonly) BOOL fabricEnabled; - -/// This method controls whether the `turboModules` feature of the New Architecture is turned on or off -@property (nonatomic, assign, readonly) BOOL turboModuleEnabled; - /// Return the bundle URL for the main bundle. @property (nonatomic, nonnull) RCTBundleURLBlock bundleURLBlock; diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm index 0c15c230aacb..f6569b69ede3 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm @@ -46,8 +46,6 @@ - (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock { if (self = [super init]) { _bundleURLBlock = bundleURLBlock; - _fabricEnabled = YES; - _turboModuleEnabled = YES; } return self; } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 4cb8f69152e0..f87beedbb67e 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -1693,8 +1693,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge; public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; - public @property (assign, readonly) BOOL fabricEnabled; - public @property (assign, readonly) BOOL turboModuleEnabled; public @property (weak) id jsRuntimeConfiguratorDelegate; public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index efcf207217fd..03d25f39e452 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -1692,8 +1692,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge; public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; - public @property (assign, readonly) BOOL fabricEnabled; - public @property (assign, readonly) BOOL turboModuleEnabled; public @property (weak) id jsRuntimeConfiguratorDelegate; public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index fe198bfd356b..1a3b9fcda354 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -1693,8 +1693,6 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge; public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; - public @property (assign, readonly) BOOL fabricEnabled; - public @property (assign, readonly) BOOL turboModuleEnabled; public @property (weak) id jsRuntimeConfiguratorDelegate; public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); From de07bfaaf5f1f60ef3cb0c8b3eff711057ff72f6 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Fri, 11 Sep 2026 17:47:01 -0700 Subject: [PATCH 2/2] Remove newArchEnabled from root view factory initializers (#58488) Summary: Remove the unused `newArchEnabled` parameter from `RCTRootViewFactoryConfiguration` initializers and update callers. Changelog: [iOS][Breaking] - Remove `newArchEnabled` from `RCTRootViewFactoryConfiguration` initializers; use `initWithBundleURL:` or `initWithBundleURLBlock:` instead Differential Revision: D119673104 --- .../Libraries/AppDelegate/RCTReactNativeFactory.mm | 2 +- .../Libraries/AppDelegate/RCTRootViewFactory.h | 5 ++--- .../Libraries/AppDelegate/RCTRootViewFactory.mm | 10 ---------- scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api | 4 ++-- scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api | 4 ++-- scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api | 4 ++-- 6 files changed, 9 insertions(+), 20 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm index e4ee18ccb518..34716a8f3e19 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm @@ -289,7 +289,7 @@ - (RCTRootViewFactory *)createRCTRootViewFactory }; RCTRootViewFactoryConfiguration *configuration = - [[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock newArchEnabled:YES]; + [[RCTRootViewFactoryConfiguration alloc] initWithBundleURLBlock:bundleUrlBlock]; configuration.customizeRootView = ^(UIView *_Nonnull rootView) { [weakSelf.delegate customizeRootView:(RCTRootView *)rootView]; diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h index 000963c81e1a..60aefdd0ccb4 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h @@ -55,10 +55,9 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc * pointing to a path inside the app resources, e.g. `file://.../main.jsbundle`. * */ -- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock - newArchEnabled:(BOOL)newArchEnabled NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock NS_DESIGNATED_INITIALIZER; -- (instancetype)initWithBundleURL:(NSURL *)bundleURL newArchEnabled:(BOOL)newArchEnabled; +- (instancetype)initWithBundleURL:(NSURL *)bundleURL; /** * Block that allows to override logic of creating root view instance. diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm index f6569b69ede3..8aead8c49478 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm @@ -32,16 +32,6 @@ @implementation RCTRootViewFactoryConfiguration -- (instancetype)initWithBundleURL:(NSURL *)bundleURL newArchEnabled:(BOOL)newArchEnabled -{ - return [self initWithBundleURL:bundleURL]; -} - -- (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock newArchEnabled:(BOOL)newArchEnabled -{ - return [self initWithBundleURLBlock:bundleURLBlock]; -} - - (instancetype)initWithBundleURLBlock:(RCTBundleURLBlock)bundleURLBlock { if (self = [super init]) { diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index f87beedbb67e..122f795afe6c 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -1694,8 +1694,8 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; public @property (weak) id jsRuntimeConfiguratorDelegate; - public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); - public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); + public virtual instancetype initWithBundleURL:(NSURL* bundleURL); + public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock); } interface RCTSafeAreaViewComponentView : public RCTViewComponentView { diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 03d25f39e452..2cc2e6a8f9d0 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -1693,8 +1693,8 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; public @property (weak) id jsRuntimeConfiguratorDelegate; - public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); - public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); + public virtual instancetype initWithBundleURL:(NSURL* bundleURL); + public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock); } interface RCTSafeAreaViewComponentView : public RCTViewComponentView { diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 1a3b9fcda354..1b8ad1ce8ea1 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -1694,8 +1694,8 @@ interface RCTRootViewFactoryConfiguration : public NSObject { public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress; public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge; public @property (weak) id jsRuntimeConfiguratorDelegate; - public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled); - public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled); + public virtual instancetype initWithBundleURL:(NSURL* bundleURL); + public virtual instancetype initWithBundleURLBlock:(RCTBundleURLBlock bundleURLBlock); } interface RCTSafeAreaViewComponentView : public RCTViewComponentView {