From 13161494ad5b6f6bd0e84bffb9d817173dcd732c Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Wed, 14 Oct 2026 05:43:52 -0700 Subject: [PATCH] Mark `RCTLegacyViewManagerInteropCoordinator.h` as private Summary: Mark `RCTLegacyViewManagerInteropCoordinator.h` as private, the last unguarded header in `legacyviewmanagerinterop`. Its only includer, `RCTLegacyViewManagerInteropCoordinatorAdapter.h`, is an exported header, so it now forward-declares the coordinator instead of importing it. Changelog: [Internal] Differential Revision: D125207358 --- .../RCTLegacyViewManagerInteropComponentView.mm | 1 + .../RCTLegacyViewManagerInteropCoordinatorAdapter.h | 6 +++++- .../RCTLegacyViewManagerInteropCoordinatorAdapter.mm | 1 + .../RCTLegacyViewManagerInteropCoordinator.h | 2 ++ scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api | 10 ---------- .../cxx-api/api-snapshots/ReactAppleFrameworksCxx.api | 10 ---------- scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api | 10 ---------- scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api | 10 ---------- 8 files changed, 9 insertions(+), 41 deletions(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm index e0808af76e4f..bbfe97903e01 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm @@ -15,6 +15,7 @@ #import #import #import +#import #import #import "RCTLegacyViewManagerInteropCoordinatorAdapter.h" diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h index d6d57e59cd32..ae6471251429 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h @@ -8,10 +8,14 @@ #ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROP #import -#import +#import +#include +#include NS_ASSUME_NONNULL_BEGIN +@class RCTLegacyViewManagerInteropCoordinator; + @interface RCTLegacyViewManagerInteropCoordinatorAdapter : NSObject - (instancetype)initWithCoordinator:(RCTLegacyViewManagerInteropCoordinator *)coordinator reactTag:(NSInteger)tag; diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm index 3b37e7bc7d90..f75dc268dd1d 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm @@ -10,6 +10,7 @@ #ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROP #import +#import #import @implementation RCTLegacyViewManagerInteropCoordinatorAdapter { diff --git a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h index 9777adeb5847..86eceb49a5f3 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +++ b/packages/react-native/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#include + #ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROP #import diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 75f6b681b9d3..26c3fbb50e71 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -1292,16 +1292,6 @@ interface RCTLegacyViewManagerInteropComponentView : public RCTViewComponentView public virtual static void supportLegacyViewManagersWithPrefix:(NSString* prefix); } -interface RCTLegacyViewManagerInteropCoordinator : public NSObject { - public virtual NSString* componentViewName(); - public virtual UIView* createPaperViewWithTag:(NSInteger tag); - public virtual instancetype initWithComponentData:bridge:bridgeProxy:bridgelessInteropData:(RCTComponentData* componentData, _Nullable RCTBridge* bridge, _Nullable RCTBridgeProxy* bridgeProxy, RCTBridgeModuleDecorator* bridgelessInteropData); - public virtual void addObserveForTag:usingBlock:(NSInteger tag, InterceptorBlock block); - public virtual void handleCommand:args:reactTag:paperView:(NSString* commandName, NSArray* args, NSInteger tag, UIView* paperView); - public virtual void removeObserveForTag:(NSInteger tag); - public virtual void setProps:forView:(NSDictionary* props, UIView* view); -} - interface RCTLegacyViewManagerInteropCoordinatorAdapter : public NSObject { public @property (copy) void(^eventInterceptor)(std::string eventName, folly::dynamic&& event); public @property (strong) UIView* paperView; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api index d4bb31bd721b..00b1cdc09cde 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api @@ -1335,16 +1335,6 @@ interface RCTLegacyViewManagerInteropComponentView : public RCTViewComponentView public virtual static void supportLegacyViewManagersWithPrefix:(NSString* prefix); } -interface RCTLegacyViewManagerInteropCoordinator : public NSObject { - public virtual NSString* componentViewName(); - public virtual UIView* createPaperViewWithTag:(NSInteger tag); - public virtual instancetype initWithComponentData:bridge:bridgeProxy:bridgelessInteropData:(RCTComponentData* componentData, _Nullable RCTBridge* bridge, _Nullable RCTBridgeProxy* bridgeProxy, RCTBridgeModuleDecorator* bridgelessInteropData); - public virtual void addObserveForTag:usingBlock:(NSInteger tag, InterceptorBlock block); - public virtual void handleCommand:args:reactTag:paperView:(NSString* commandName, NSArray* args, NSInteger tag, UIView* paperView); - public virtual void removeObserveForTag:(NSInteger tag); - public virtual void setProps:forView:(NSDictionary* props, UIView* view); -} - interface RCTLegacyViewManagerInteropCoordinatorAdapter : public NSObject { public @property (copy) void(^eventInterceptor)(std::string eventName, folly::dynamic&& event); public @property (strong) UIView* paperView; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 540845dc7eb9..be9943a4bea1 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -1292,16 +1292,6 @@ interface RCTLegacyViewManagerInteropComponentView : public RCTViewComponentView public virtual static void supportLegacyViewManagersWithPrefix:(NSString* prefix); } -interface RCTLegacyViewManagerInteropCoordinator : public NSObject { - public virtual NSString* componentViewName(); - public virtual UIView* createPaperViewWithTag:(NSInteger tag); - public virtual instancetype initWithComponentData:bridge:bridgeProxy:bridgelessInteropData:(RCTComponentData* componentData, _Nullable RCTBridge* bridge, _Nullable RCTBridgeProxy* bridgeProxy, RCTBridgeModuleDecorator* bridgelessInteropData); - public virtual void addObserveForTag:usingBlock:(NSInteger tag, InterceptorBlock block); - public virtual void handleCommand:args:reactTag:paperView:(NSString* commandName, NSArray* args, NSInteger tag, UIView* paperView); - public virtual void removeObserveForTag:(NSInteger tag); - public virtual void setProps:forView:(NSDictionary* props, UIView* view); -} - interface RCTLegacyViewManagerInteropCoordinatorAdapter : public NSObject { public @property (copy) void(^eventInterceptor)(std::string eventName, folly::dynamic&& event); public @property (strong) UIView* paperView; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 23d1a62bc2d9..7359b990e12c 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -1292,16 +1292,6 @@ interface RCTLegacyViewManagerInteropComponentView : public RCTViewComponentView public virtual static void supportLegacyViewManagersWithPrefix:(NSString* prefix); } -interface RCTLegacyViewManagerInteropCoordinator : public NSObject { - public virtual NSString* componentViewName(); - public virtual UIView* createPaperViewWithTag:(NSInteger tag); - public virtual instancetype initWithComponentData:bridge:bridgeProxy:bridgelessInteropData:(RCTComponentData* componentData, _Nullable RCTBridge* bridge, _Nullable RCTBridgeProxy* bridgeProxy, RCTBridgeModuleDecorator* bridgelessInteropData); - public virtual void addObserveForTag:usingBlock:(NSInteger tag, InterceptorBlock block); - public virtual void handleCommand:args:reactTag:paperView:(NSString* commandName, NSArray* args, NSInteger tag, UIView* paperView); - public virtual void removeObserveForTag:(NSInteger tag); - public virtual void setProps:forView:(NSDictionary* props, UIView* view); -} - interface RCTLegacyViewManagerInteropCoordinatorAdapter : public NSObject { public @property (copy) void(^eventInterceptor)(std::string eventName, folly::dynamic&& event); public @property (strong) UIView* paperView;