Skip to content

feat: Runtime toggle for shake-to-report feedback - #8591

Merged
itaybre merged 8 commits into
mainfrom
antonislilis/cocoa-1446-support-runtime-enabledisable-of-shake-to-report
Jul 31, 2026
Merged

feat: Runtime toggle for shake-to-report feedback#8591
itaybre merged 8 commits into
mainfrom
antonislilis/cocoa-1446-support-runtime-enabledisable-of-shake-to-report

Conversation

@antonis

@antonis antonis commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📜 Description

Adds Runtime toggle for shake-to-report feedback- #8591

💡 Motivation and Context

Fixes #7970

💚 How did you test it?

  • Added tests
  • Manually with the sample app which was enhanced with 04e07e0 to include two new toggles in the feedback tab
Feedback screen

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed. feat(apple): Document runtime shake-to-report toggle sentry-docs#18875
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • If I added a new public API, I also added it to the SentryObjC wrapper.

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.
@linear-code

linear-code Bot commented Jul 29, 2026

Copy link
Copy Markdown

COCOA-1446

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 790713a

@antonis antonis added the run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request label Jul 29, 2026
@sentry

sentry Bot commented Jul 29, 2026

Copy link
Copy Markdown

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
SDK-Size io.sentry.sample.SDK-Size 9.24.0 (1) Release

⚙️ sentry-cocoa Build Distribution Settings

Replace the single setShakeGestureEnabled(_:) toggle with
enableFeedbackOnShake() and disableFeedbackOnShake(), aligning
the naming with the Android and React Native SDKs.
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1224.84 ms 1260.51 ms 35.67 ms
Size 24.14 KiB 1.26 MiB 1.23 MiB

Baseline results on branch: main

Startup times

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

@antonis antonis removed the run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request label Jul 30, 2026
@antonis
antonis marked this pull request as ready for review July 30, 2026 09:38
Comment thread Sources/Swift/Integrations/UserFeedback/SentryFeedbackAPI.swift
@itaybre itaybre added the run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request label Jul 31, 2026

@itaybre itaybre left a comment

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.

LGTM

@itaybre
itaybre merged commit c15a64b into main Jul 31, 2026
345 of 368 checks passed
@itaybre
itaybre deleted the antonislilis/cocoa-1446-support-runtime-enabledisable-of-shake-to-report branch July 31, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved run-full-ci Allows gated GitHub Action workflows to run for a labelled pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support runtime enable/disable of shake-to-report

2 participants