fix(apple): Dynamic SDK version, enableLogs fix, dSYM guidance, and doctor command#1247
fix(apple): Dynamic SDK version, enableLogs fix, dSYM guidance, and doctor command#1247filipealva wants to merge 1 commit intogetsentry:masterfrom
Conversation
…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>
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes
Internal Changes
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
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.', | ||
| ); |
There was a problem hiding this comment.
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.
| if ( | ||
| trimmed.includes('SentrySDK.start') || | ||
| trimmed.includes('[SentrySDK start') | ||
| ) { |
There was a problem hiding this comment.
| interface SpmPackageRef { | ||
| repositoryURL?: string; | ||
| requirement?: { minimumVersion: string }; | ||
| } |
There was a problem hiding this comment.
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)
| !content.includes('token=') || | ||
| content.includes('token=\n') || | ||
| content.includes('token=_YOUR') | ||
| ) { |
There was a problem hiding this comment.
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.


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.