fix: wait for current dSYM before uploading symbols - #776
Merged
Conversation
Contributor
Prompt To Fix All With AI### Issue 1
build-tools/upload-symbols.sh:153-157
**Unexpanded Info.plist path variables**
If a target defines `INFOPLIST_FILE` with an Xcode build-setting expression such as `$(TARGET_NAME)/Info.plist`, this code checks a path containing the literal expression and silently falls back to `MARKETING_VERSION` and `CURRENT_PROJECT_VERSION`, causing symbols to be uploaded under stale release and build identifiers.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix: wait for current dSYM before upload..." | Re-trigger Greptile |
turnipdabeets
approved these changes
Aug 24, 2026
Member
Author
|
Tested this with two real Release iOS device builds of
Both builds and real symbol uploads completed successfully. The temporary sample changes were removed afterward. |
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.
💡 Motivation and Context
Xcode can start the symbol upload phase while
dsymutilis still producing the app dSYM. Uploading at that point can fail or send incomplete symbols. Declaring the dSYM as an Xcode input is not safe because it can create dependency cycles in apps with embedded extensions.The upload script can also use
MARKETING_VERSIONandCURRENT_PROJECT_VERSIONeven when EAS remote versioning writes the shipped values directly to the source Info.plist.This moves the native part of PostHog/posthog-js#4602 into the shared iOS upload script. It addresses PostHog/posthog-js#4574 for native iOS and React Native integrations.
The script now waits until the app executable and main dSYM have matching UUIDs and no process has the dSYM open for writing. It fails after 60 seconds by default so a release cannot succeed without its native symbols.
POSTHOG_DSYM_TIMEOUTcan change that timeout.It also resolves literal, custom, and compound Xcode build settings from the source Info.plist. Existing Xcode version settings remain the fallback for missing, unresolved, or C-preprocessed plist values.
💚 How did you test it?
PostHogExampleWithSPMsample for a Release iOS device with XcodeBuildMCP and posthog-cli 0.14.1. The real CLI uploaded the generated dSYM successfully.$(APP_VERSION)and${BUILD_NUMBER}whileMARKETING_VERSIONandCURRENT_PROJECT_VERSIONremained1.0and1. The app, dSYM, and uploaded release all used2.10.0+154.make test. All 763 SDK tests passed.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Pi implemented and tested the change. The dSYM input-path approach was rejected because it can create Xcode dependency cycles. The upload script uses UUID, writer, and timeout checks instead. Shared Info.plist handling in posthog-cli is tracked in PostHog/posthog#87775.