Skip to content

Commit c389859

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Reach public ReactCommon modules through umbrellas from iOS platform headers (#58885)
Summary: Pull Request resolved: #58885 Exported iOS headers in `React/Fabric` and `RCTHost.h` included fine-grained headers of public ReactCommon modules, which trip the modules' public guard under `RN_STRICT_API` in any app or library importing them (e.g. `RCTViewComponentView.h`, the base of most third-party Fabric components). Switch them to the module umbrellas (`<React/RendererCore.h>`, `<React/View.h>`, `<React/Graphics.h>`, `<React/ComponentRegistry.h>`, `<React/Utils.h>`, `<React/Timing.h>`). "For frameworks" includes are unchanged; the guards are inert without the flag. Changelog: [Internal] Reviewed By: javache Differential Revision: D123610706 fbshipit-source-id: b43d492d979c6571a1c0c44037f6d8bdc2ef81bb
1 parent 1af1186 commit c389859

14 files changed

Lines changed: 21 additions & 33 deletions

‎packages/react-native/React/Fabric/AppleEventBeat.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
#import <QuartzCore/QuartzCore.h>
1515

16+
#include <React/RendererCore.h>
1617
#include <ReactCommon/RuntimeExecutor.h>
17-
#include <react/renderer/core/EventBeat.h>
1818
#include <react/utils/RunLoopObserver.h>
1919

2020
@class RCTEventBeatFlusherLayer;

‎packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
#import <React/RCTComponentViewProtocol.h>
1111
#import <React/RCTConstants.h>
1212
#import <React/RCTTouchableComponentViewProtocol.h>
13+
#import <React/RendererCore.h>
1314
#import <React/UIView+ComponentViewProtocol.h>
14-
#import <react/renderer/components/view/ViewEventEmitter.h>
15-
#import <react/renderer/components/view/ViewProps.h>
16-
#import <react/renderer/core/EventEmitter.h>
17-
#import <react/renderer/core/LayoutMetrics.h>
18-
#import <react/renderer/core/Props.h>
15+
#import <React/View.h>
1916

2017
NS_ASSUME_NONNULL_BEGIN
2118

‎packages/react-native/React/Fabric/Mounting/RCTComponentViewFactory.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
#import <UIKit/UIKit.h>
99

10+
#import <React/ComponentRegistry.h>
1011
#import <React/RCTComponentViewDescriptor.h>
1112
#import <React/RCTComponentViewProtocol.h>
1213
#import <jsi/jsi.h>
13-
#import <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
1414

1515
NS_ASSUME_NONNULL_BEGIN
1616

‎packages/react-native/React/Fabric/Mounting/RCTComponentViewProtocol.h‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77

88
#import <UIKit/UIKit.h>
99

10-
#import <react/renderer/componentregistry/ComponentDescriptorProvider.h>
11-
#import <react/renderer/core/EventEmitter.h>
12-
#import <react/renderer/core/LayoutMetrics.h>
13-
#import <react/renderer/core/Props.h>
14-
#import <react/renderer/core/State.h>
10+
#import <React/ComponentRegistry.h>
11+
#import <React/RendererCore.h>
1512

1613
NS_ASSUME_NONNULL_BEGIN
1714

‎packages/react-native/React/Fabric/Mounting/RCTComponentViewRegistry.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#import <React/RCTComponentViewDescriptor.h>
1111
#import <React/RCTComponentViewFactory.h>
1212
#import <React/RCTComponentViewProtocol.h>
13-
#import <react/renderer/core/ReactPrimitives.h>
13+
#import <React/RendererCore.h>
1414

1515
NS_ASSUME_NONNULL_BEGIN
1616

‎packages/react-native/React/Fabric/Mounting/RCTMountingManager.h‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99

1010
#import <React/RCTMountingManagerDelegate.h>
1111
#import <React/RCTPrimitives.h>
12-
#import <react/renderer/core/ComponentDescriptor.h>
13-
#import <react/renderer/core/RawProps.h>
14-
#import <react/renderer/core/ReactPrimitives.h>
12+
#import <React/RendererCore.h>
13+
#import <React/Utils.h>
1514
#import <react/renderer/mounting/MountingCoordinator.h>
1615
#import <react/renderer/mounting/ShadowView.h>
17-
#import <react/utils/ContextContainer.h>
1816

1917
NS_ASSUME_NONNULL_BEGIN
2018

‎packages/react-native/React/Fabric/RCTConversions.h‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
#import <UIKit/UIKit.h>
99

1010
#import <React/Graphics.h>
11-
#import <react/renderer/components/view/AccessibilityPrimitives.h>
12-
#import <react/renderer/components/view/primitives.h>
13-
#import <react/renderer/core/LayoutPrimitives.h>
11+
#import <React/RendererCore.h>
12+
#import <React/Timing.h>
13+
#import <React/View.h>
1414
#import <react/renderer/graphics/RCTPlatformColorUtils.h>
15-
#import <react/timing/primitives.h>
1615

1716
NS_ASSUME_NONNULL_BEGIN
1817

‎packages/react-native/React/Fabric/RCTScheduler.h‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@
88
#import <UIKit/UIKit.h>
99
#import <memory>
1010

11-
#import <react/renderer/componentregistry/ComponentDescriptorFactory.h>
12-
#import <react/renderer/core/ComponentDescriptor.h>
13-
#import <react/renderer/core/EventListener.h>
14-
#import <react/renderer/core/LayoutConstraints.h>
15-
#import <react/renderer/core/LayoutContext.h>
11+
#import <React/ComponentRegistry.h>
12+
#import <React/RendererCore.h>
13+
#import <React/Utils.h>
1614
#import <react/renderer/mounting/MountingCoordinator.h>
1715
#import <react/renderer/scheduler/SchedulerToolbox.h>
1816
#import <react/renderer/scheduler/SurfaceHandler.h>
1917
#import <react/renderer/uimanager/UIManager.h>
20-
#import <react/utils/ContextContainer.h>
2118

2219
NS_ASSUME_NONNULL_BEGIN
2320

‎packages/react-native/React/Fabric/RCTSurfacePresenter.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#import <React/RCTPrimitives.h>
1111
#import <React/RCTSurfacePresenterStub.h>
1212
#import <React/RCTSurfaceStage.h>
13+
#import <React/Utils.h>
1314
#import <ReactCommon/RuntimeExecutor.h>
1415
#import <react/renderer/scheduler/SurfaceHandler.h>
15-
#import <react/utils/ContextContainer.h>
1616

1717
NS_ASSUME_NONNULL_BEGIN
1818

‎packages/react-native/React/Fabric/RCTSurfacePresenterBridgeAdapter.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*/
77

88
#import <Foundation/Foundation.h>
9+
#import <React/Utils.h>
910
#import <ReactCommon/RuntimeExecutor.h>
1011
#import <UIKit/UIKit.h>
11-
#import <react/utils/ContextContainer.h>
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414

0 commit comments

Comments
 (0)