HomeDocsiOSShake to report

Shake to report

v1.8.0

Let testers shake the device to open a report with the current app screen attached.

Enable shake detection

Add NSMotionUsageDescription to your app’s Info.plist with a reason such as “Detect a shake to open a bug report.” Shake detection stays disabled if this description is missing or empty.

Shake detection is off by default and works independently of screenshot detection.

swift
BugScreenSDK.configure(
    apiKey: "fb_your_api_key_here",
    enableShakeDetection: true
)

Turn detection on or off

Connect separate settings controls to these enable and disable handlers after initializing the SDK:

swift
@MainActor
func onEnableShakeDetectionSelected() {
    BugScreenSDK.setShakeDetectionEnabled(true)
}

@MainActor
func onDisableShakeDetectionSelected() {
    BugScreenSDK.setShakeDetectionEnabled(false)
}

Disabling stops motion detection and pending shake capture. An open report keeps its draft and attachments. Calls before initialization do nothing; reinitializing uses the new initial setting.

What the report includes

BugScreen attempts to attach the current app screen before opening the reporter. Capture is limited to your app; protected content and some video or rendering surfaces may be absent. If capture fails, the report opens without an image.

The tester can review, remove or redact the image before submitting. Shake capture does not read the photo library or request screen-recording permission.

Detection runs only while your app is active. Shakes leave an open report unchanged. Finish a recording started from the floating button or notification before shaking to report.

Try a report

  1. Bring your app to the foreground on a device with an accelerometer. Hold the device still briefly, then shake deliberately. The reporter should open once with the current screen attached when capture is available.
  2. Review the image and enter a description. Further shakes should leave the draft unchanged.
  3. Dismiss the reporter and turn detection off using your disable control. Shake again and check that no reporter opens.
  4. Turn detection back on using your enable control. Hold the device still briefly, then shake and check that a new report opens.

If nothing opens, check that shake detection is enabled and your app is active. Hold the device still briefly before trying another deliberate shake. Normal rotation and gentle movement should not open the reporter.