mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add redbox subspec to React-debug pod (#56585)
Summary: Same fix as https://github.com/facebook/react-native/issues/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: https://github.com/facebook/react-native/pull/56585 Test Plan: CI Reviewed By: cortinico Differential Revision: D102809818 Pulled By: motiz88 fbshipit-source-id: 9871706a8e028c27f64f4d0dd9942d7c408c6b3b
This commit is contained in:
1 parent
59ac1db76e
commit
78a740d40a
1 file changed
+7
-2
@@ -25,11 +25,16 @@ Pod::Spec.new do |s|
|
||||
s.author = "Meta Platforms, Inc. and its affiliates"
|
||||
s.platforms = min_supported_versions
|
||||
s.source = source
|
||||
s.source_files = podspec_sources("**/*.{cpp,h}", "**/*.h")
|
||||
s.exclude_files = "**/tests/**/*.{cpp,h}"
|
||||
s.source_files = podspec_sources("*.{cpp,h}", "*.h")
|
||||
s.header_dir = "react/debug"
|
||||
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||||
"DEFINES_MODULE" => "YES" }
|
||||
|
||||
resolve_use_frameworks(s, header_mappings_dir: "../..", module_name: "React_debug")
|
||||
|
||||
s.subspec "redbox" do |ss|
|
||||
ss.source_files = podspec_sources("redbox/*.{cpp,h}", "redbox/*.h")
|
||||
ss.exclude_files = "redbox/tests/**/*.{cpp,h}"
|
||||
ss.header_dir = "react/debug/redbox"
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user