Repository navigation
fix(cli): Use sentry-cocoa 9.x APIs in the Apple wizard snippets - #2790
Merged
Merged
Conversation
The Logs option is top-level in sentry-cocoa 9.x, so write `options.enableLogs` instead of `options.experimental.enableLogs`. The Objective-C profiling lifecycle constant is `SentryProfileLifecycleTrace`, not `SentryProfilingLifecycleTrace`. Both broke the build of the app right after `sentry wizard ios`. Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
antonis
approved these changes
Dec 2, 2026
antonis
marked this pull request as ready for review
December 2, 2026 13:28
antonis
enabled auto-merge
December 2, 2026 13:28
Contributor
|
Tested end to end with the packed npm build of a local branch: The app now compiles as the wizard leaves it:
Before this PR, the same projects failed with |
This was referenced Dec 2, 2026
Merged
antonis
added a commit
that referenced
this pull request
Dec 2, 2026
…iling-platform-check Resolve the templates.test.ts conflict with #2790 by keeping both new describe blocks: the profiling platform check and the 9.x API check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 3, 2026
14 of 16 tasks
This branch was successfully deployed
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.
Testing
sentry wizard ioson fresh Xcode 16+ projects showed that the app doesn't compile after the wizard runs. Two template bugs inpackages/cli/src/lib/wizard/apple/templates.ts, carried over from@sentry/wizard9.1.0, cause it:Logs uses an option that doesn't exist in sentry-cocoa 9.x. With Logs on (the default answer), both snippets wrote
options.experimental.enableLogs, which fails with:In 9.x Logs is a top-level option, so the snippets now write
options.enableLogs = true(Swift) andoptions.enableLogs = YES;(Objective-C), with the comment "Enable logs to be sent to Sentry".@objc public var enableLogsis onOptionsfrom 9.0.0 through 9.36.0, and the wizard installssentry-cocoafrom 9.0.0 up to the next major, so it works on every version the wizard can install.The Objective-C snippet used the wrong profiling lifecycle name. It wrote
profiling.lifecycle = SentryProfilingLifecycleTrace;, which fails on every Objective-C app with:The 9.x name is
SentryProfileLifecycleTrace, from the Swift@objc enum SentryProfileLifecycle. The Swift snippet's.tracewas already correct.via Antonis Lilis.
--
View Session [Sentry]