Upgrade Image visibility to "for frameworks" (#58283)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58283

Reclassifies `react/renderer/components/image:image` from public to "for frameworks" under the C++ stable API three-tier visibility model.

Consumers that opt into `RN_STRICT_API` now get a suppressible warning where they previously got an error pointing at the umbrella, and can acknowledge it with `RN_ALLOW_FRAMEWORKS`; without that flag the guards are inert, so no existing build changes behaviour.

Changelog: [Internal]

Reviewed By: christophpurrer, javache

Differential Revision: D118440296

fbshipit-source-id: 45faf64ef36d3c3c596b1b8c06408fc43d3b59f8
This commit is contained in:
Jakub Piasecki authored and meta-codesync[bot] committed 2026-09-03 05:25:48 -07:00
1 parent 0c0e9f0840
commit d3b7893998
10 files changed
+7 -70

No files matched your search

@@ -169,10 +169,6 @@ val preparePrefab by
"../ReactCommon/react/renderer/components/image/",
"react/renderer/components/image/",
),
Pair(
"../ReactCommon/react/renderer/components/image/React/",
"React/",
),
// rrc_view
Pair(
"../ReactCommon/react/renderer/components/view/",
@@ -43,19 +43,13 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("react/renderer/components/image/**/*.{m,mm,cpp,h}", "react/renderer/components/image/**/*.h")
s.exclude_files = ["react/renderer/components/image/tests", "react/renderer/components/image/React"]
s.exclude_files = "react/renderer/components/image/tests"
s.header_dir = "react/renderer/components/image"
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"HEADER_SEARCH_PATHS" => header_search_path.join(" ")
}
s.subspec "imageUmbrella" do |ss|
ss.source_files = "react/renderer/components/image/React/*.h"
ss.header_dir = ""
ss.header_mappings_dir = "react/renderer/components/image"
end
resolve_use_frameworks(s, header_mappings_dir: './', module_name: "React_FabricImage")
s.dependency "React-jsiexecutor", version
@@ -7,7 +7,7 @@
#pragma once
#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/renderer/components/image/ImageShadowNode.h>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
@@ -7,7 +7,7 @@
#pragma once
#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/renderer/components/view/ViewEventEmitter.h>
#include <react/renderer/imagemanager/primitives.h>
@@ -7,7 +7,7 @@
#pragma once
#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
@@ -7,7 +7,7 @@
#pragma once
#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/renderer/components/image/ImageEventEmitter.h>
#include <react/renderer/components/image/ImageProps.h>
@@ -7,7 +7,7 @@
#pragma once
#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>
#include <react/renderer/imagemanager/ImageRequest.h>
#include <react/renderer/imagemanager/ImageRequestParams.h>
@@ -1,37 +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.
*/
#pragma once
// =============================================================================
// Umbrella header for the `react/renderer/components/image` module - public entry point.
//
// #include <React/Image.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<react/renderer/components/image/...>` includes; only outside
// consumers use this umbrella.
// =============================================================================
// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them. The marker
// is saved and restored rather than defined and undefined: the scope ends at
// this block, so later *direct* includes in the same TU are still caught, and
// it nests inside an enclosing umbrella rather than disarming it.
#pragma push_macro("RN_UMBRELLA_CONTEXT")
#undef RN_UMBRELLA_CONTEXT
#define RN_UMBRELLA_CONTEXT 1
#include <react/renderer/components/image/ImageComponentDescriptor.h>
#include <react/renderer/components/image/ImageEventEmitter.h>
#include <react/renderer/components/image/ImageProps.h>
#include <react/renderer/components/image/ImageShadowNode.h>
#include <react/renderer/components/image/ImageState.h>
#include <react/renderer/components/image/conversions.h>
#undef RN_UMBRELLA_CONTEXT
#pragma pop_macro("RN_UMBRELLA_CONTEXT")
@@ -7,7 +7,7 @@
#pragma once
#include <react/cxxstableapi/UmbrellaGuard.h>
#include <react/cxxstableapi/FrameworksGuard.h>
#include <unordered_map>
@@ -491,22 +491,6 @@ const PodspecExceptions /*: {[key: string]: PodSpecConfiguration} */ = {
},
],
},
'ReactCommon/React-FabricImage.podspec': {
name: 'React-FabricImage',
headerPatterns: ['react/renderer/components/image/**/*.h'],
excludePatterns: [
'react/renderer/components/image/tests',
'react/renderer/components/image/React',
],
headerDir: 'react/renderer/components/image',
subSpecs: [
{
name: 'imageUmbrella',
headerPatterns: ['react/renderer/components/image/React/*.h'],
headerDir: 'React',
},
],
},
'ReactCommon/callinvoker/React-callinvoker.podspec': {
name: 'React-callinvoker',
headerPatterns: ['**/*.h'],