From 802cdd95ac4463a220af4fe26b5bc58b348292be Mon Sep 17 00:00:00 2001 From: Jakub Piasecki Date: Mon, 24 Aug 2026 03:51:09 -0700 Subject: [PATCH] Cover `react/runtime/nativeviewconfig` with Stable API guards (#58045) Summary: Pull Request resolved: https://github.com/react/react-native/pull/58045 Classifies `react/runtime/nativeviewconfig:nativeviewconfig` as a private target under the three-tier C++ stable API visibility model. Consumers that opt into `RN_STRICT_API` now get an error if they include its header directly; without that flag the guard is inert, so no existing build changes behaviour. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D116918780 fbshipit-source-id: b8921eb908037ac99280f40c31c2c47d970f8dc2 --- .../ReactCommon/react/runtime/React-RuntimeCore.podspec | 1 + .../ReactCommon/react/runtime/nativeviewconfig/CMakeLists.txt | 2 +- .../nativeviewconfig/LegacyUIManagerConstantsProviderBinding.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec b/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec index 863168dc0fd..1f91a792e1a 100644 --- a/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec +++ b/packages/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec @@ -52,6 +52,7 @@ Pod::Spec.new do |s| add_rncore_dependency(s) s.dependency "React-jsinspector" + s.dependency "React-cxxstableapi" add_dependency(s, "React-jsitooling", :framework_name => "JSITooling") mark_as_react_native_build(s) diff --git a/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/CMakeLists.txt b/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/CMakeLists.txt index 5fa0a44e6fd..09dfc99366f 100644 --- a/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/CMakeLists.txt +++ b/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/CMakeLists.txt @@ -16,5 +16,5 @@ add_library( ) target_include_directories(bridgelessnativeviewconfig PUBLIC .) -target_link_libraries(bridgelessnativeviewconfig jsi) +target_link_libraries(bridgelessnativeviewconfig jsi react_cxxstableapi) target_compile_reactnative_options(bridgelessnativeviewconfig PRIVATE) diff --git a/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/LegacyUIManagerConstantsProviderBinding.h b/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/LegacyUIManagerConstantsProviderBinding.h index bdbce193016..02f76444ed8 100644 --- a/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/LegacyUIManagerConstantsProviderBinding.h +++ b/packages/react-native/ReactCommon/react/runtime/nativeviewconfig/LegacyUIManagerConstantsProviderBinding.h @@ -7,6 +7,8 @@ #pragma once +#include + #include namespace facebook::react::LegacyUIManagerConstantsProviderBinding {