Commit f18dc29
fix(ios): resolve hermesc for SwiftPM apps in react-native-xcode.sh
Release bundling derived hermesc exclusively from $PODS_ROOT/hermes-engine,
which does not exist in a SwiftPM app — every SwiftPM consumer's Release
build depended on HERMES_CLI_PATH being set by hand (or on the injector's
baked path never going stale). When no Pods installation exists and the
current HERMES_CLI_PATH does not point at a real file, resolve the
hermes-compiler npm package through react-native's own dependency graph:
react-native pins hermes-compiler, so the compiler's bytecode version always
matches the prebuilt hermes VM artifacts. The missing-file condition also
heals injector-baked paths gone stale after a package-store move.
Strictly SwiftPM-scoped: in a CocoaPods build the hermes-engine pod owns
both the VM and hermesc, and its hermes train may legitimately differ from
the npm package — an ungated fallback compiled bundles the podded VM
rejected at launch ("Wrong bytecode version"), which is why the no-Pods
gate is load-bearing.
Shell-only change with no unit harness; verified end-to-end by the local
iOS build matrix: spm Release cells green on monorepo and fresh-consumer
apps via the fallback, all CocoaPods cells green with the fallback provably
inert.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent b0a5081 commit f18dc29
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
83 | 103 | | |
84 | 104 | | |
85 | 105 | | |
| |||
0 commit comments