Skip to content

fix(cli): Keep the iOS wizard's changes in XcodeGen's project.yml - #2801

Merged
antonis merged 2 commits into
mainfrom
fix/ios-wizard-xcodegen-full-setup
Dec 2, 2026
Merged

antonis merged 2 commits into
mainfrom
fix/ios-wizard-xcodegen-full-setup

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

This follows #2792. Re-testing that fix on an XcodeGen project showed that xcodegen generate also drops the wizard's other .xcodeproj changes: the "Upload Debug Symbols to Sentry" build phase and ENABLE_USER_SCRIPT_SANDBOXING = NO. No dSYM was uploaded, so crashes arrived unsymbolicated (native_missing_dsym). DEBUG_INFORMATION_FORMAT = dwarf-with-dsym survived only because it is XcodeGen's Release default. A project where the package did link loses that link on regeneration too.

For every XcodeGen project (a project.yml next to the .xcodeproj, detected as before), sentry wizard ios now prints one project.yml block for the target:

  • packages: and the target's dependencies:, as in fix(cli): Warn when the iOS wizard can't link the Sentry package #2792, with the repository URL and version from sentry-swift-package.ts.
  • postBuildScripts: with a name: Upload Debug Symbols to Sentry entry. Its inputFiles: entry is the path the wizard adds to the build phase, and its script: | is the script the wizard writes: getRunScriptTemplate with the same org and project slugs and uploadSource value.
  • settings: base: with DEBUG_INFORMATION_FORMAT: dwarf-with-dsym and ENABLE_USER_SCRIPT_SANDBOXING: "NO", matching setDebugInformationFormatAndSandbox. "NO" is quoted so YAML doesn't read it as a boolean.

The block ends with "Then run xcodegen generate."

  • When the package linked, the block is a warning that the next xcodegen generate drops these changes unless they're added to project.yml, and the run still ends with the success message.
  • When it didn't link, the warning still starts with "The wizard couldn't add the Sentry package…", and the run still ends with "Sentry setup is incomplete".
  • Projects without project.yml are unchanged.

Supporting changes:

  • templates.ts exports scriptInputFile, the input path without quotes. scriptInputPath is now built from it.
  • configure-xcode-project.ts gives the uploadSource value it already passed a name, UPLOAD_SOURCE, so the printed script uses the same value as the build phase.

XcodeGen expands ${VAR} in project.yml only for variables set when it runs and leaves unknown ones as they are, so ${DWARF_DSYM_FOLDER_PATH} and the other build-time variables in inputFiles reach the build phase unchanged.

The new xcodegen-frameworks-build-phase fixture is xcodegen-no-frameworks-build-phase plus a Frameworks build phase, so the package links.

via Antonis Lilis.

--

View Session [Sentry]

For an XcodeGen project, `sentry wizard ios` now prints the full
`project.yml` block that keeps its changes across `xcodegen generate`:
the Sentry package and target dependency, a `postBuildScripts` entry with
the wizard's debug-symbol upload script, and the
`DEBUG_INFORMATION_FORMAT` and `ENABLE_USER_SCRIPT_SANDBOXING` settings.
It shows this whether or not the package linked.

Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Dec 2, 2026 2:58pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Dec 2, 2026 2:58pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – sentry-local December 2, 2026 14:57 Inactive
@antonis
antonis marked this pull request as ready for review December 2, 2026 15:01
@antonis
antonis enabled auto-merge December 2, 2026 15:01
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 2, 2026
@antonis
antonis added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 3ab8997 Dec 2, 2026
32 checks passed
@antonis
antonis deleted the fix/ios-wizard-xcodegen-full-setup branch December 2, 2026 15:14

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 4bfe027b Deployed Dec 2, 2026 by vercel[bot]
Preview – sentry-local — 4bfe027b Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant