Skip to content

Commit 78a740d

Browse files
motiz88meta-codesync[bot]
authored andcommitted
Add redbox subspec to React-debug pod (#56585)
Summary: Same fix as #56584 (targeting 0.83-stable), applied to main. 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. On main this is currently masked because `test_e2e_ios_templateapp` uses prebuilt `React.framework`, but it would break any from-source static library build that includes `React-CoreModules`. Changelog: [Internal] Pull Request resolved: #56585 Test Plan: CI Reviewed By: cortinico Differential Revision: D102809818 Pulled By: motiz88 fbshipit-source-id: 9871706a8e028c27f64f4d0dd9942d7c408c6b3b
1 parent 59ac1db commit 78a740d

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)