From c6e1453af67ef5f2605b4738921ea77e14eed3de Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Wed, 7 Oct 2026 04:30:36 -0700 Subject: [PATCH] Reach public ReactCommon modules through umbrellas from iOS platform headers Summary: 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 (``, ``, ``, ``, ``, ``). "For frameworks" includes are unchanged; the guards are inert without the flag. Changelog: [Internal] Differential Revision: D123610706 --- packages/react-native/React/Fabric/AppleEventBeat.h | 4 ++-- .../ComponentViews/View/RCTViewComponentView.h | 7 ++----- .../React/Fabric/Mounting/RCTComponentViewFactory.h | 2 +- .../React/Fabric/Mounting/RCTComponentViewProtocol.h | 7 ++----- .../React/Fabric/Mounting/RCTComponentViewRegistry.h | 2 +- .../React/Fabric/Mounting/RCTMountingManager.h | 6 ++---- packages/react-native/React/Fabric/RCTConversions.h | 10 ++++------ packages/react-native/React/Fabric/RCTScheduler.h | 9 +++------ .../react-native/React/Fabric/RCTSurfacePresenter.h | 2 +- .../React/Fabric/RCTSurfacePresenterBridgeAdapter.h | 2 +- .../React/Fabric/RCTTouchableComponentViewProtocol.h | 2 +- .../React/Fabric/Utils/PlatformRunLoopObserver.h | 2 +- .../React/Fabric/Utils/RCTLinearGradient.h | 2 +- .../React/Fabric/Utils/RCTRadialGradient.h | 2 +- .../react/runtime/platform/ios/ReactCommon/RCTHost.h | 2 +- 15 files changed, 24 insertions(+), 37 deletions(-) diff --git a/packages/react-native/React/Fabric/AppleEventBeat.h b/packages/react-native/React/Fabric/AppleEventBeat.h index 71ea0a112dcd..af88312c9d9a 100644 --- a/packages/react-native/React/Fabric/AppleEventBeat.h +++ b/packages/react-native/React/Fabric/AppleEventBeat.h @@ -13,9 +13,9 @@ #import +#include +#include #include -#include -#include @class RCTEventBeatFlusherLayer; diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h index c9c965b9e2d7..124a85c65c17 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h @@ -10,12 +10,9 @@ #import #import #import +#import #import -#import -#import -#import -#import -#import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/Mounting/RCTComponentViewFactory.h b/packages/react-native/React/Fabric/Mounting/RCTComponentViewFactory.h index 21c0bb0eed8d..da1f2d32ac68 100644 --- a/packages/react-native/React/Fabric/Mounting/RCTComponentViewFactory.h +++ b/packages/react-native/React/Fabric/Mounting/RCTComponentViewFactory.h @@ -7,10 +7,10 @@ #import +#import #import #import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/Mounting/RCTComponentViewProtocol.h b/packages/react-native/React/Fabric/Mounting/RCTComponentViewProtocol.h index f3b35ecb36a9..3ffc91da343a 100644 --- a/packages/react-native/React/Fabric/Mounting/RCTComponentViewProtocol.h +++ b/packages/react-native/React/Fabric/Mounting/RCTComponentViewProtocol.h @@ -7,11 +7,8 @@ #import -#import -#import -#import -#import -#import +#import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/Mounting/RCTComponentViewRegistry.h b/packages/react-native/React/Fabric/Mounting/RCTComponentViewRegistry.h index 1e85eec961c5..584c4cb7ea97 100644 --- a/packages/react-native/React/Fabric/Mounting/RCTComponentViewRegistry.h +++ b/packages/react-native/React/Fabric/Mounting/RCTComponentViewRegistry.h @@ -10,7 +10,7 @@ #import #import #import -#import +#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/Mounting/RCTMountingManager.h b/packages/react-native/React/Fabric/Mounting/RCTMountingManager.h index 70a56433d57b..277e4b2708cd 100644 --- a/packages/react-native/React/Fabric/Mounting/RCTMountingManager.h +++ b/packages/react-native/React/Fabric/Mounting/RCTMountingManager.h @@ -9,12 +9,10 @@ #import #import -#import -#import -#import +#import +#import #import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/RCTConversions.h b/packages/react-native/React/Fabric/RCTConversions.h index d4f705c82b6e..eba3094e769f 100644 --- a/packages/react-native/React/Fabric/RCTConversions.h +++ b/packages/react-native/React/Fabric/RCTConversions.h @@ -7,13 +7,11 @@ #import -#import -#import -#import -#import +#import +#import +#import +#import #import -#import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/RCTScheduler.h b/packages/react-native/React/Fabric/RCTScheduler.h index 8b809580c10c..214e43b30103 100644 --- a/packages/react-native/React/Fabric/RCTScheduler.h +++ b/packages/react-native/React/Fabric/RCTScheduler.h @@ -8,16 +8,13 @@ #import #import -#import -#import -#import -#import -#import +#import +#import +#import #import #import #import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/RCTSurfacePresenter.h b/packages/react-native/React/Fabric/RCTSurfacePresenter.h index 24fe26a1434e..e1a6d9fccbb3 100644 --- a/packages/react-native/React/Fabric/RCTSurfacePresenter.h +++ b/packages/react-native/React/Fabric/RCTSurfacePresenter.h @@ -10,9 +10,9 @@ #import #import #import +#import #import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/RCTSurfacePresenterBridgeAdapter.h b/packages/react-native/React/Fabric/RCTSurfacePresenterBridgeAdapter.h index 27f622a906e2..fef2a7d4bda3 100644 --- a/packages/react-native/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +++ b/packages/react-native/React/Fabric/RCTSurfacePresenterBridgeAdapter.h @@ -6,9 +6,9 @@ */ #import +#import #import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/RCTTouchableComponentViewProtocol.h b/packages/react-native/React/Fabric/RCTTouchableComponentViewProtocol.h index 162aa866cb3e..47cbf38fae1c 100644 --- a/packages/react-native/React/Fabric/RCTTouchableComponentViewProtocol.h +++ b/packages/react-native/React/Fabric/RCTTouchableComponentViewProtocol.h @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#import #import -#import @protocol RCTTouchableComponentViewProtocol - (facebook::react::SharedTouchEventEmitter)touchEventEmitterAtPoint:(CGPoint)point; diff --git a/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h b/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h index 3faf9ec093f2..f3e16d124366 100644 --- a/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h +++ b/packages/react-native/React/Fabric/Utils/PlatformRunLoopObserver.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace facebook::react { diff --git a/packages/react-native/React/Fabric/Utils/RCTLinearGradient.h b/packages/react-native/React/Fabric/Utils/RCTLinearGradient.h index 959e41b2923a..7babd1354fb1 100644 --- a/packages/react-native/React/Fabric/Utils/RCTLinearGradient.h +++ b/packages/react-native/React/Fabric/Utils/RCTLinearGradient.h @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/React/Fabric/Utils/RCTRadialGradient.h b/packages/react-native/React/Fabric/Utils/RCTRadialGradient.h index 769ed75c9dcc..5c5fc058da34 100644 --- a/packages/react-native/React/Fabric/Utils/RCTRadialGradient.h +++ b/packages/react-native/React/Fabric/Utils/RCTRadialGradient.h @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#import #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h index a7471de8af52..8f5576b56354 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h @@ -10,7 +10,7 @@ #import #import -#import +#import #import #import "RCTInstance.h"