fix(mobile): define PODS_ROOT for ShareExtension so ccache wrapper resolves - #4857
Merged
Conversation
…solves
react_native_post_install sets CC/CXX/LD/LDPLUSPLUS project-wide to
$(REACT_NATIVE_PATH)/scripts/xcode/ccache-*.sh when ccache exists on the
builder (EAS images ship it) and apple.ccacheEnabled is set.
REACT_NATIVE_PATH expands through ${PODS_ROOT}, which CocoaPods only
defines for pod-integrated targets. ShareExtension links no pods, so
PODS_ROOT expanded empty, CC became /../../../../node_modules/... and
the EAS iOS build died with "unable to spawn process".
Define PODS_ROOT=$(SRCROOT)/Pods on the extension target the way
CocoaPods would, so the inherited compiler wrapper path resolves.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the single-file Xcode project mod that sets Files Reviewed (1 files)
Reviewed by claude-sonnet-5 · Input: 16 · Output: 4K · Cached: 310.8K Review guidance: REVIEW.md from base branch |
iscekic
enabled auto-merge (squash)
July 29, 2026 12:19
jeanduplessis
approved these changes
Jul 29, 2026
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the failing iOS build in kilo-app Release run 30430285185:
unable to spawn process '/../../../../node_modules/.pnpm/react-native@0.86.0_.../node_modules/react-native/scripts/xcode/ccache-clang.sh' (No such file or directory) (in target 'ShareExtension' from project 'Kilo').Root cause
ios.ccacheEnabled: true(app.config.ts) →react_native_post_install(:ccache_enabled => true)writesCC/CXX/LD/LDPLUSPLUS = $(REACT_NATIVE_PATH)/scripts/xcode/ccache-*.shproject-wide onKilo.xcodeprojwhen ccache exists on the builder.REACT_NATIVE_PATHis${PODS_ROOT}/../../../.., and CocoaPods only definesPODS_ROOTfor pod-integrated targets.ShareExtensiontarget (created by expo-share-intent, no Podfile integration) has no Pods xcconfig →PODS_ROOTempty →CCexpands to/../../../../node_modules/...→ spawn fails.PODS_ROOTfrom its Pods xcconfig, which is why only the extension failed.Fix
Define
PODS_ROOT = $(SRCROOT)/Podson the ShareExtension target build configs — exactly what CocoaPods would set if the target were pod-integrated — in the existing local plugin wrapperapps/mobile/plugins/withExpoShareIntent.js. One build setting; ccache keeps working everywhere.Gotchas handled:
withXcodeProjectmods run in reverse registration order (ours registers before upstream so it runs after target creation); the stored target name is quoted with no comment entry (raw-name match with quote tolerance); the value is written quoted because(and)are array delimiters in pbxproj syntax.Verification
Reproduced and fixed locally (macOS + ccache + CocoaPods, same as EAS builders):
xcodebuild -showBuildSettings -target ShareExtensionshowedCC = /../../../../node_modules/.pnpm/...— byte-identical to the EAS error.CC/LD/CXX/LDPLUSPLUSresolve to the realnode_modules/.pnpm/react-native@0.86.0_.../scripts/xcode/ccache-*.sh(verified the file exists and is executable).xcodebuild -scheme ShareExtension buildspawnsccache-clang.sh(as the link driver) and producesShareExtension.appexsuccessfully. (Residual failures in that isolated invocation are the host app target's pod module maps, an artifact of building the extension scheme without building pods first — not related.)pnpm format && pnpm typecheck && pnpm lint && pnpm check:unused(apps/mobile) + rootpnpm format+git diff --checkall clean.EAS re-verification happens automatically on merge — the release job is gated to
refs/heads/main, so it can't be exercised from this branch.