Remove bridgelessEnabled from RCTRootViewFactoryConfiguration (#58416)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58416

Follow-up to the Android change in the previous diff, applying the same cleanup
to iOS.

Bridgeless is the only supported mode, so the `bridgelessEnabled` surface on
`RCTRootViewFactoryConfiguration` was already deprecated and hardcoded: the
property was assigned `YES` in every initializer, the two deprecated
initializers ignored the argument entirely, and
`RCTDefaultReactNativeFactoryDelegate` returned `YES` unconditionally. Nothing
read the value.

Changes:

- Removed the `bridgelessEnabled` property from
  `RCTRootViewFactoryConfiguration`.
- Removed the two deprecated initializers
  `initWithBundleURLBlock:newArchEnabled:turboModuleEnabled:bridgelessEnabled:`
  and `initWithBundleURL:newArchEnabled:turboModuleEnabled:bridgelessEnabled:`.
  Both were marked `__deprecated` and discarded all arguments except the bundle
  URL, delegating to the designated initializer.
- Removed the `bridgelessEnabled` method from
  `RCTDefaultReactNativeFactoryDelegate`. It was not declared in any header or
  protocol.
- Updated the one caller in `RCTReactNativeFactory` to use
  `initWithBundleURLBlock:newArchEnabled:`.

Behavior is unchanged: bridgeless remains unconditionally enabled. Callers of
the designated `initWithBundleURLBlock:newArchEnabled:` and
`initWithBundleURL:newArchEnabled:` initializers are unaffected.

Changelog:
[iOS][Breaking] - Remove the deprecated `bridgelessEnabled` property and the deprecated `initWithBundleURLBlock:newArchEnabled:turboModuleEnabled:bridgelessEnabled:` / `initWithBundleURL:newArchEnabled:turboModuleEnabled:bridgelessEnabled:` initializers from `RCTRootViewFactoryConfiguration`; bridgeless is always enabled

Reviewed By: rubennorte

Differential Revision: D116318829

fbshipit-source-id: 9a8c232f22a9435934f848a7a80401841c2e29a2
This commit is contained in:
Christoph Purrer
2026-09-10 09:10:22 -07:00
committed by meta-codesync[bot]
parent 0e01003f53
commit 2a9eca81b8
7 changed files with 1 additions and 56 deletions
@@ -1696,14 +1696,11 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
public @property (assign, readonly) BOOL bridgelessEnabled;
public @property (assign, readonly) BOOL fabricEnabled;
public @property (assign, readonly) BOOL turboModuleEnabled;
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
public virtual instancetype initWithBundleURL:newArchEnabled:turboModuleEnabled:bridgelessEnabled:(NSURL* bundleURL, BOOL newArchEnabled, BOOL turboModuleEnabled, BOOL bridgelessEnabled);
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);
public virtual instancetype initWithBundleURLBlock:newArchEnabled:turboModuleEnabled:bridgelessEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled, BOOL turboModuleEnabled, BOOL bridgelessEnabled);
}
interface RCTSafeAreaViewComponentView : public RCTViewComponentView {
@@ -1695,14 +1695,11 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
public @property (assign, readonly) BOOL bridgelessEnabled;
public @property (assign, readonly) BOOL fabricEnabled;
public @property (assign, readonly) BOOL turboModuleEnabled;
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
public virtual instancetype initWithBundleURL:newArchEnabled:turboModuleEnabled:bridgelessEnabled:(NSURL* bundleURL, BOOL newArchEnabled, BOOL turboModuleEnabled, BOOL bridgelessEnabled);
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);
public virtual instancetype initWithBundleURLBlock:newArchEnabled:turboModuleEnabled:bridgelessEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled, BOOL turboModuleEnabled, BOOL bridgelessEnabled);
}
interface RCTSafeAreaViewComponentView : public RCTViewComponentView {
@@ -1696,14 +1696,11 @@ interface RCTRootViewFactoryConfiguration : public NSObject {
public @property (assign) RCTLoadSourceForBridgeBlock loadSourceForBridge;
public @property (assign) RCTLoadSourceForBridgeWithProgressBlock loadSourceForBridgeWithProgress;
public @property (assign) RCTSourceURLForBridgeBlock sourceURLForBridge;
public @property (assign, readonly) BOOL bridgelessEnabled;
public @property (assign, readonly) BOOL fabricEnabled;
public @property (assign, readonly) BOOL turboModuleEnabled;
public @property (weak) id<RCTJSRuntimeConfiguratorProtocol> jsRuntimeConfiguratorDelegate;
public virtual instancetype initWithBundleURL:newArchEnabled:(NSURL* bundleURL, BOOL newArchEnabled);
public virtual instancetype initWithBundleURL:newArchEnabled:turboModuleEnabled:bridgelessEnabled:(NSURL* bundleURL, BOOL newArchEnabled, BOOL turboModuleEnabled, BOOL bridgelessEnabled);
public virtual instancetype initWithBundleURLBlock:newArchEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled);
public virtual instancetype initWithBundleURLBlock:newArchEnabled:turboModuleEnabled:bridgelessEnabled:(RCTBundleURLBlock bundleURLBlock, BOOL newArchEnabled, BOOL turboModuleEnabled, BOOL bridgelessEnabled);
}
interface RCTSafeAreaViewComponentView : public RCTViewComponentView {