Skip to content

Commit e996bb2

Browse files
committed
fix(ci): disable prebuilt RNCore on iOS — RN 0.85.3 + Xcode 26 incompat
CI build-ios 一直挂 'memory' file not found,本地复现也一致。 根因:RN 0.85.3 默认开 RCT_USE_PREBUILT_RNCORE 时,React-umbrella.h 把 RCTBridgeConstants.h 放在 RCTDefines.h 之前,且 module.modulemap 用 wildcard 把每个 header 隔离成 sub-module —— ReactCodegen 编译 .cpp 时找不到 <memory> 等 C++ stdlib header(react/react-native#56862)。 修复路径 —— 临时禁掉 prebuilt(从源码编译 React-Core),等 0.85.4 含 PR #56862 后再恢复: - ci.yml build-ios: RCT_USE_RN_DEP=0 + RCT_USE_PREBUILT_RNCORE=0 - example/ios/Podfile: 撤销之前加的 CLANG_CXX_LIBRARY workaround (根因找到后不再需要 hack) 本地用 RCT_USE_PREBUILT_RNCORE=0 重 pod install 后跑 build:ios 通过, 生成 ReactNativeUmengExample.app 成功。 参考: - react/react-native#56862 (fix backport to 0.84/0.85) - invertase/react-native-firebase#8883 (workaround 推荐) - expo/expo#35517 (同问题,同根因)
1 parent fdf54ed commit e996bb2

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ jobs:
122122
env:
123123
XCODE_VERSION: 26
124124
TURBO_CACHE_DIR: .turbo/ios
125-
RCT_USE_RN_DEP: 1
126-
RCT_USE_PREBUILT_RNCORE: 1
125+
# RN 0.85.3 + Xcode 26 + prebuilt RNCore 三者组合下 ReactCodegen .cpp
126+
# 编译报 'memory' file not found(umbrella header 顺序 + module 隔离 bug)。
127+
# 等 RN 0.85.4 含 PR #56862 fix 后可恢复 prebuilt。
128+
RCT_USE_RN_DEP: 0
129+
RCT_USE_PREBUILT_RNCORE: 0
127130

128131
steps:
129132
- name: Checkout

example/ios/Podfile

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,5 @@ target 'ReactNativeUmengExample' do
3030
:mac_catalyst_enabled => false,
3131
# :ccache_enabled => true
3232
)
33-
34-
# Xcode 26 + RN 0.85 兼容: ReactCodegen 的 .cpp 找不到 <memory>。
35-
# 显式给所有 Pod 设 libc++ + C++20 + -stdlib=libc++ 兜底。
36-
installer.pods_project.targets.each do |target|
37-
target.build_configurations.each do |config|
38-
config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
39-
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++20'
40-
existing_flags = config.build_settings['OTHER_CPLUSPLUSFLAGS'] || '$(inherited)'
41-
unless existing_flags.to_s.include?('-stdlib=libc++')
42-
config.build_settings['OTHER_CPLUSPLUSFLAGS'] = "#{existing_flags} -stdlib=libc++".strip
43-
end
44-
end
45-
end
4633
end
4734
end

0 commit comments

Comments
 (0)