From e2226bd822dcb2c2e9340c701ee08f3841a2de90 Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Thu, 29 Oct 2026 14:51:43 -0700 Subject: [PATCH] Delete dead RCTCxxBridgeDelegate protocol Summary: The C++ bridge delegate protocol has no implementers left: its only method served the removed `RCTCxxBridge`. Delete the header with its build entry, the stale forward declaration, and the unused imports. Changelog: [iOS][Removed] - Remove unused `RCTCxxBridgeDelegate` protocol Reviewed By: zeyap Differential Revision: D127294781 --- .../AppDelegate/RCTRootViewFactory.h | 1 - .../React/CxxBridge/RCTCxxBridgeDelegate.h | 31 ------------------- .../api-snapshots/ReactAppleDebugCxx.api | 4 --- .../api-snapshots/ReactAppleFrameworksCxx.api | 4 --- .../api-snapshots/ReactAppleNewarchCxx.api | 4 --- .../api-snapshots/ReactAppleReleaseCxx.api | 4 --- 6 files changed, 48 deletions(-) delete mode 100644 packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h index e7af4bb09b6e..53ade7d6fef2 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h @@ -11,7 +11,6 @@ #import #import "RCTJSRuntimeConfiguratorProtocol.h" -@protocol RCTCxxBridgeDelegate; @protocol RCTComponentViewFactoryComponentProvider; @protocol RCTTurboModuleManagerDelegate; @protocol RCTHostDelegate; diff --git a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h deleted file mode 100644 index e2d48db4548d..000000000000 --- a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#include - -#import - -namespace facebook::react { - -class JSExecutorFactory; - -} // namespace facebook::react - -// This is a separate class so non-C++ implementations don't need to -// take a C++ dependency. - -@protocol RCTCxxBridgeDelegate - -/** - * In the RCTCxxBridge, if this method is implemented, return a - * ExecutorFactory instance which can be used to create the executor. - * If not implemented, or returns an empty pointer, JSIExecutorFactory - * will be used with a JSCRuntime. - */ -- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge; - -@end diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index cb68d6c58bd7..0776b99ce483 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -2600,10 +2600,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api index b05f7665f7da..f627391bcd41 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api @@ -2662,10 +2662,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 497a3a43a3ee..d444c92404a9 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -2593,10 +2593,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 4f7774be13cd..0bf91e2cbebc 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -2600,10 +2600,6 @@ protocol RCTCustomRefreshControlProtocol { public @property (weak) UIScrollView* scrollView; } -protocol RCTCxxBridgeDelegate : public RCTBridgeDelegate { - public virtual std::unique_ptr jsExecutorFactoryForBridge:(RCTBridge* bridge); -} - protocol RCTDebuggingOverlayViewProtocol : public NSObject { public virtual void clearElementsHighlights(); public virtual void highlightElements:(const NSArray* elements);