Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The following options can be configured in `SentryUserFeedbackConfiguration`:
| Option | Type | Default | Description |
| ------------------------ | --------------- | ------- | ----------------------------------------------------------------------------------------------- |
| `animations` | `Bool` | `true` | Shows animations when presenting and dismissing the form. |
| `useShakeGesture` | `Bool` | `false` | Opens the form when the user shakes the device. |
| `useShakeGesture` | `Bool` | `false` | Opens the form when the user shakes the device. Toggle it at runtime with `SentrySDK.feedback.enableOnShake()` / `disableOnShake()`. |
| `showFormForScreenshots` | `Bool` | `false` | Opens the form when the user takes a screenshot and attaches that screenshot. |
| `configureForm` | Callback | `nil` | Configures the managed form fields and labels. |
| `configureTheme` | Callback | `nil` | Configures colors, fonts, and form element outlines. |
Expand Down
18 changes: 18 additions & 0 deletions docs/platforms/apple/common/user-feedback/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,24 @@ SentrySDK.start { options in
}];
```

In version [9.25.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.25.0) or later, you can also enable or disable the shake gesture at runtime, for example once an asynchronously resolved feature flag or user role decides whether to offer feedback. This requires the User Feedback integration to be configured via `configureUserFeedback`; otherwise the calls are a no-op. Call these methods from the main thread.

```swift {tabTitle:Swift} {mdExpandTabs}
// Start detecting shake gestures to open the feedback form
SentrySDK.feedback.enableOnShake()

// Stop detecting shake gestures
SentrySDK.feedback.disableOnShake()
```

```objc {tabTitle:Objective-C}
// Start detecting shake gestures to open the feedback form
[[SentryObjCSDK feedback] enableOnShake];

// Stop detecting shake gestures
[[SentryObjCSDK feedback] disableOnShake];
```

### Session Replay

The managed feedback form works with <PlatformLink to="/session-replay/">Session Replay</PlatformLink>. When the form opens, the Replay SDK buffers up to 30 seconds of the user's session. If the user submits feedback, the replay is sent with the feedback so you can see what led up to it.
Expand Down
Loading