Skip to content

fix(apple): Dynamic SDK version, enableLogs fix, dSYM guidance, and doctor command#1247

Open
filipealva wants to merge 1 commit intogetsentry:masterfrom
filipealva:fix-apple-wizard-issues
Open

fix(apple): Dynamic SDK version, enableLogs fix, dSYM guidance, and doctor command#1247
filipealva wants to merge 1 commit intogetsentry:masterfrom
filipealva:fix-apple-wizard-issues

Conversation

@filipealva
Copy link
Copy Markdown

@filipealva filipealva commented Mar 31, 2026

fix(apple): Dynamic SDK version, enableLogs fix, dSYM guidance, and doctor command

The Apple wizard had several issues affecting iOS users:

  • SPM dependency was hardcoded to minimumVersion 8.0.0 with
    upToNextMajorVersion, meaning it would never resolve to 9.x.
    Now fetches the latest version from the Sentry release registry
    (sentry.cocoa) and falls back to 8.0.0 if the fetch fails.

  • The enableLogs code snippet used options.experimental.enableLogs
    which no longer exists in sentry-cocoa v9. Removed the .experimental
    namespace so the generated code compiles correctly.

  • The dSYM upload build phase script had no way to skip uploads and
    lacked CI/CD auth guidance. Added SENTRY_SKIP_DSYM_UPLOAD env var
    support and a note about setting SENTRY_AUTH_TOKEN in CI.

  • Added an info message about the expected Sentry.framework dSYM
    warning in App Store uploads (normal for pre-compiled SPM frameworks).

  • There was no way to diagnose or fix an existing integration. Added
    a --fix flag that runs five diagnostic checks (sentry-cli, auth
    token, SDK version, build phase, init code) and offers to auto-fix
    what it can.

…octor command

The Apple wizard had several issues affecting iOS users:

- SPM dependency was hardcoded to minimumVersion 8.0.0 with
  upToNextMajorVersion, meaning it would never resolve to 9.x.
  Now fetches the latest version from the Sentry release registry
  (sentry.cocoa) and falls back to 8.0.0 if the fetch fails.

- The enableLogs code snippet used options.experimental.enableLogs
  which no longer exists in sentry-cocoa v9. Removed the .experimental
  namespace so the generated code compiles correctly.

- The dSYM upload build phase script had no way to skip uploads and
  lacked CI/CD auth guidance. Added SENTRY_SKIP_DSYM_UPLOAD env var
  support and a note about setting SENTRY_AUTH_TOKEN in CI.

- Added an info message about the expected Sentry.framework dSYM
  warning in App Store uploads (normal for pre-compiled SPM frameworks).

- There was no way to diagnose or fix an existing integration. Added
  a --fix flag that runs five diagnostic checks (sentry-cli, auth
  token, SDK version, build phase, init code) and offers to auto-fix
  what it can.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes

  • (apple) Dynamic SDK version, enableLogs fix, dSYM guidance, and doctor command by filipealva in #1247

Internal Changes

  • (agents) Convert commands to dotagents skills by chargome in #1236
  • Pin GitHub Actions to full-length commit SHAs by joshuarli in #1244

🤖 This preview updates automatically when you update the PR.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

} else if (!hasFailures) {
clack.log.success(
'All checks passed! Your Sentry integration looks healthy.',
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings still reported as fully healthy

Medium Severity

The final summary prints All checks passed whenever there are no fail results, even if earlier checks returned warn. This makes runAppleDoctorWizard report a healthy integration after warning findings, which can hide real configuration problems from users.

Fix in Cursor Fix in Web

if (
trimmed.includes('SentrySDK.start') ||
trimmed.includes('[SentrySDK start')
) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented init code can be misdetected

Low Severity

checkCodeInit only skips lines starting with // or /*, so lines inside block comments (for example starting with *) are still scanned. A commented SentrySDK.start can be treated as active code, causing a false pass result.

Fix in Cursor Fix in Web

interface SpmPackageRef {
repositoryURL?: string;
requirement?: { minimumVersion: string };
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDK check misses non-minimum SPM requirements

Medium Severity

checkSdkVersion only recognizes SPM dependencies that use requirement.minimumVersion. If a project pins Sentry with another valid requirement shape (like exactVersion, branch, or revision), it is treated as if no Sentry package exists and reports an incorrect warning.

Additional Locations (1)
Fix in Cursor Fix in Web

!content.includes('token=') ||
content.includes('token=\n') ||
content.includes('token=_YOUR')
) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auth file check can produce false passes

Low Severity

The .sentryclirc validation treats any file containing token= as valid and marks it pass, without verifying an [auth] section or token context. A malformed or unrelated config can be reported as healthy, so --fix diagnostics may claim auth is configured when uploads still fail.

Additional Locations (1)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant