"RCTHost.h not found — react-native-navigation 8.3.2 + RN 0.77.3 + use_frameworks! :linkage => :dynamic (Firebase 26 SPM mode)"
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- firebase, ios, react-native
- 领域
- build-system, mobile
调研方向
从最小的 Podfile 配置开始,并在执行所述清理步骤后重现构建。跟踪从 RNNComponentViewCreator.h 经由 RNNReactButtonView.h 的导入,并比较动态链接下 React-RuntimeApple framework 的头文件。使用 React Native Firebase 26 的 SPM 模式和 react-native-navigation 8.3.2 使示例配置成功构建,即表示完成。
由索引模型根据 Issue 内容生成。
描述
What happened?
Build fails on iOS with react-native-navigation when using use_frameworks! :linkage => :dynamic, which is required to support React Native Firebase 26's native SPM resolution (RNFB 26+ resolves Firebase via SPM by default, and RNFB docs explicitly state SPM mode cannot be combined with :linkage => :static).
Error:
node_modules/react-native-navigation/lib/ios/RNNReactButtonView.h:2:9: fatal error: 'React-RuntimeApple/ReactCommon/RCTHost.h' file not found
2 | #import <React-RuntimeApple/ReactCommon/RCTHost.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Included via: RNNComponentViewCreator.h → RNNReactButtonView.h
This looks related to #8075, #8094 and #8026, but those are scoped to :linkage => :static. The fix that closed #8026 (PR #8171, documentation only) specifically opts Firebase back onto CocoaPods ($RNFirebaseDisableSPM = true) and requires static linkage — which isn't viable for us since we upgraded specifically to use RNFB 26's SPM support.
Things I tried, all with a full clean between attempts (rm -rf Pods Podfile.lock ~/Library/Developer/Xcode/DerivedData/*, then pod install):
- post_install patch adding HEADER_SEARCH_PATHS / FRAMEWORK_SEARCH_PATHS pointing at
${PODS_CONFIGURATION_BUILD_DIR}/React-RuntimeApple/React_RuntimeApple.framework/Headers— no change. - Patching the import to
#import <React_RuntimeApple/RCTHost.h>(flat framework-style) — got past the "file not found," but then failed with the framework loading yet not containing RCTHost.h at that build path. - Reverting the import and adding the full set of transitive header search paths RCTHost.h itself needs (React-RuntimeCore, React-jserrorhandler, React-jsinspector, RCT-Folly, fmt, etc., per https://gist.github.com/Kudo/1b892e340f181bd610fcaa7369887593) — same original error persists at the first import.
Environment:
- react-native-navigation: 8.3.2
- react-native: 0.77.3
- @react-native-firebase/*: ^26.1.0
- use_frameworks: :dynamic
- New Architecture: enabled
- Xcode 16, iOS 26.2 SDK
What was the expected behaviour?
Project builds successfully on iOS with react-native-navigation installed alongside react-native-firebase 26+ using use_frameworks! :linkage => :dynamic (required for Firebase's native SPM resolution).
Was it tested on latest react-native-navigation?
- I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!
Minimal repro Podfile config that triggers it:
ENV['SENTRY_USE_SPM'] = '1'
platform :ios, '16.0'
prepare_react_native_project!
$RNFirebaseAnalyticsWithoutAdIdSupport = true
use_frameworks! :linkage => :dynamic
target 'App' do
config = use_native_modules!
pod 'GoogleUtilities', :modular_headers => true
use_react_native!(
:path => config[:reactNativePath],
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
end
Dependencies: react-native-navigation 8.3.2, @react-native-firebase/app ^26.1.0, react-native 0.77.3.
Happy to share a minimal reproducible repo if that'd help triage — let me know and I'll strip our app down to a bare repro.
In what environment did this happen?
React Native Navigation version: 8.3.2
React Native version: 0.77.3
Has Fabric (React Native's new rendering system) enabled: yes
Node version: 20.19.0
Device model: iPhone (simulator + physical device, arm64)
iOS version: 18 / building against iOS 26.2 SDK
- 主要语言
- MDX
- 星标
- 13.2k
- 派生
- 2.6k
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wix/react-native-navigation 的其他 Issue
-
needs triage triage: documentation
难度 2/5 1-3 小时 新手友好度 68/100
wix/react-native-navigation#8343 · 1 条评论 ·
-
[Fix] searchBar `focus:` true ignored on mergeOptions when searchController already exists可能已有人在做 @IsaacIsrael 于 158 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
wix/react-native-navigation#8318 ·
-
needs triage type: accepted/bug
难度 4/5 3-5 天 新手友好度 25/100
wix/react-native-navigation#8365 · 2 条评论 ·
-
`showOverlay` creates a scene-less `UIWindow`, so overlays never appear under UIScene lifecycle可能已有人在做 @yedidyak 于 4 天前认领。 未关闭platform: iOS type: accepted/bug
难度 3/5 1-2 天 新手友好度 68/100
wix/react-native-navigation#8345 · 2 条评论 · 2 个 reaction ·
-
platform: iOS type: accepted/bug
难度 4/5 3-5 天 新手友好度 48/100
wix/react-native-navigation#8339 ·
查看 wix/react-native-navigation 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 61/100
JWhite212/SignalLadder#215 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
yegor256/antlr2ebnf-maven-plugin#155 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
canonical/craft-actions#146 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
lucide-icons/lucide#5165 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
sillsdev/SIL.TextEditing#164 ·
维护者通常 1 天内回复