feat: Runtime toggle for shake-to-report feedback - #8591
Merged
itaybre merged 8 commits intoJul 31, 2026
Merged
Conversation
Add SentrySDK.feedback.setShakeGestureEnabled(_:) to enable or disable the shake-to-report user feedback trigger at runtime, after SentrySDK.start. Sentry's options are applied synchronously during start, so consumers that decide whether to offer feedback based on an asynchronously resolved signal (e.g. a feature flag or a user role fetched at launch) could not express that choice through the useShakeGesture option alone. This routes the toggle through the feedback integration driver, which manages both the shake detector state and its notification observer, so enabling after init with useShakeGesture=false also registers the observer. The new API is exposed on the SentryObjC wrapper and is callable from hybrid SDKs via the main SDK's ObjC interface.
Contributor
|
📲 Install BuildsiOS
|
Replace the single setShakeGestureEnabled(_:) toggle with enableFeedbackOnShake() and disableFeedbackOnShake(), aligning the naming with the Android and React Native SDKs.
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e337271 | 1234.71 ms | 1270.10 ms | 35.40 ms |
| 207a888 | 1215.22 ms | 1248.98 ms | 33.75 ms |
| 2130375 | 1215.80 ms | 1237.75 ms | 21.95 ms |
| 29d546e | 1224.06 ms | 1257.05 ms | 32.98 ms |
| ffb6adc | 1218.60 ms | 1247.47 ms | 28.87 ms |
| 0ba566f | 1215.00 ms | 1258.07 ms | 43.07 ms |
| eb93b6a | 1238.60 ms | 1269.98 ms | 31.38 ms |
| 71859d3 | 1209.83 ms | 1241.65 ms | 31.83 ms |
| 6cbb85b | 1228.45 ms | 1261.09 ms | 32.63 ms |
| ddad953 | 1228.76 ms | 1262.47 ms | 33.71 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e337271 | 24.14 KiB | 1.16 MiB | 1.13 MiB |
| 207a888 | 24.14 KiB | 1.18 MiB | 1.15 MiB |
| 2130375 | 24.14 KiB | 1.26 MiB | 1.23 MiB |
| 29d546e | 24.14 KiB | 1.15 MiB | 1.13 MiB |
| ffb6adc | 24.14 KiB | 1.15 MiB | 1.12 MiB |
| 0ba566f | 24.14 KiB | 1.26 MiB | 1.23 MiB |
| eb93b6a | 24.14 KiB | 1.18 MiB | 1.15 MiB |
| 71859d3 | 24.14 KiB | 1.17 MiB | 1.15 MiB |
| 6cbb85b | 24.14 KiB | 1.23 MiB | 1.21 MiB |
| ddad953 | 24.14 KiB | 1.17 MiB | 1.15 MiB |
Previous results on branch: antonislilis/cocoa-1446-support-runtime-enabledisable-of-shake-to-report
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 31a36c3 | 1218.04 ms | 1244.66 ms | 26.62 ms |
| 805af08 | 1213.68 ms | 1248.77 ms | 35.09 ms |
| b43808e | 1202.71 ms | 1240.63 ms | 37.92 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 31a36c3 | 24.14 KiB | 1.26 MiB | 1.23 MiB |
| 805af08 | 24.14 KiB | 1.26 MiB | 1.23 MiB |
| b43808e | 24.14 KiB | 1.26 MiB | 1.23 MiB |
…46-support-runtime-enabledisable-of-shake-to-report
4 tasks
antonis
marked this pull request as ready for review
July 30, 2026 09:38
antonis
requested review from
a team,
NinjaLikesCheez,
itaybre,
noahsmartin,
philipphofmann and
philprime
as code owners
July 30, 2026 09:38
itaybre
reviewed
Jul 30, 2026
itaybre
deleted the
antonislilis/cocoa-1446-support-runtime-enabledisable-of-shake-to-report
branch
July 31, 2026 16:19
philprime
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Aug 6, 2026
## DESCRIBE YOUR PR Documents the new runtime shake-to-report toggle added to the Sentry Cocoa SDK in getsentry/sentry-cocoa#8591. - Adds a subsection under **User Feedback → Open Automatically From a Shake Gesture or Screenshot** covering `SentrySDK.feedback.enableOnShake()` / `disableOnShake()`, with Swift and Objective-C snippets. Notes that the User Feedback integration must be configured via `configureUserFeedback` (otherwise the calls are a no-op) and that the methods must be called from the main thread. - Extends the `useShakeGesture` row in the configuration table to point at the runtime toggle methods. Changes live under `apple/common/`, so they apply across all Apple platforms. Depends on getsentry/sentry-cocoa#8591 shipping in an SDK release. ## IS YOUR CHANGE URGENT? - [x] None: Not urgent, can wait up to 1 week+⚠️ Should be merged after getsentry/sentry-cocoa#8591 is released ## PRE-MERGE CHECKLIST - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --------- Co-authored-by: Philip Niedertscheider <phil.niedertscheider@sentry.io>
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.
📜 Description
Adds Runtime toggle for shake-to-report feedback- #8591
💡 Motivation and Context
Fixes #7970
💚 How did you test it?
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.