Skip to content

Commit 5c63f8d

Browse files
authored
Add redbox subspec to React-debug pod (#56584)
Add a "redbox" subspec to React-debug.podspec with its own header_dir, following the same pattern React-Fabric uses for its subdirectories. Without this, static library builds (without USE_FRAMEWORKS) flatten all headers into the top-level header_dir ("react/debug"), so imports like `<react/debug/redbox/RedBoxErrorParser.h>` fail because the "redbox/" subdirectory is lost.
1 parent d81b786 commit 5c63f8d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/react-native/ReactCommon/react/debug/React-debug.podspec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@ Pod::Spec.new do |s|
2525
s.author = "Meta Platforms, Inc. and its affiliates"
2626
s.platforms = min_supported_versions
2727
s.source = source
28-
s.source_files = podspec_sources("**/*.{cpp,h}", "**/*.h")
29-
s.exclude_files = "**/tests/**/*.{cpp,h}"
28+
s.source_files = podspec_sources("*.{cpp,h}", "*.h")
3029
s.header_dir = "react/debug"
3130
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
3231
"DEFINES_MODULE" => "YES" }
3332

3433
resolve_use_frameworks(s, header_mappings_dir: "../..", module_name: "React_debug")
34+
35+
s.subspec "redbox" do |ss|
36+
ss.source_files = podspec_sources("redbox/*.{cpp,h}", "redbox/*.h")
37+
ss.exclude_files = "redbox/tests/**/*.{cpp,h}"
38+
ss.header_dir = "react/debug/redbox"
39+
end
3540
end

0 commit comments

Comments
 (0)