iOS bug reports
With bug reporting enabled, your users and beta testers can report a bug from inside your iOS app. A short form opens, they describe the issue and send it, and the report arrives in the Appelium Dashboard with a screenshot, a recording of the screen, the console logs and network logs that led up to it, and the device and app details. In-app bug reporting for iOS and Android walks through the flow from shake to fix, in beta testing and in production.
Enable bug reporting
AppeliumFeedback.start(
apiKey: "YOUR_API_KEY",
bugReporting: .enabled()
)
With the defaults, shaking the device opens the bug report form, and the report includes a screenshot and a screen recording with touch indicators. Each option can be changed:
AppeliumFeedback.start(
apiKey: "YOUR_API_KEY",
bugReporting: .enabled(
screenshotsEnabled: true,
screenRecording: .enabled(renderTouchEvents: false),
invocationEvents: [.shake, .screenshot],
delegate: self
)
)
| Option | Default | Description |
|---|---|---|
screenshotsEnabled |
true |
Attach a screenshot of the screen at the moment the form opens. |
screenRecording |
.enabled(renderTouchEvents: true) |
Attach a recording of up to the last 3 minutes of the app's screen. renderTouchEvents draws the user's touches as circles. Use .disabled to turn recording off. |
invocationEvents |
[.shake] |
Which user actions open the form. See Invocation events. |
delegate |
nil |
A BugReportingDelegate that adds your own file to each report. |
Invocation events
.shake: the user shakes the device..screenshot: the user takes a screenshot with the device buttons.[]: no gesture opens the form. Use this when the report is opened only from your own UI.
Open the form from your app
Open the form from your own UI, for example from a "Report a problem" button in the settings screen:
@MainActor
func reportProblemTapped() {
AppeliumFeedback.invoke(reporterEmail: currentUser?.email)
}
- Call it on the main thread.
reporterEmailprefills the email field. Passnil, or callinvoke()without it, to use the email the user entered in their previous report, if any.- The call does nothing if bug reporting is not enabled or the form is already open.
To send a report without showing the form at all, see Silent invocation.
Reporter email field
By default, the reporter must enter a valid email address before sending a report. Change it before the form is shown, for example right after start:
AppeliumFeedback.reporterEmailFieldMode = .optional
| Mode | Behaviour |
|---|---|
.required (default) |
The field is shown and a valid email address is needed to send. |
.optional |
The field is shown and can be left empty. An entered address must be valid. |
.hidden |
The field is not shown. A report carries only an email that you pass to invoke(reporterEmail:). |
The form is prefilled with the email you pass to invoke(reporterEmail:), or else with the one of the previous report. Surrounding spaces are ignored.
Screen names
Bug reports, crash reports and the activity log name the visible screen after its view controller's type, for example CheckoutViewController. In SwiftUI, every screen is shown by a hosting controller, whose type says little. Name your screens with the appeliumScreenName modifier on the root view of each screen:
struct CheckoutView: View {
var body: some View {
Form {
// ...
}
.appeliumScreenName("Checkout")
}
}
In UIKit, name a view controller's screen when its type says little, or when one view controller shows several screens:
AppeliumFeedback.setScreenName("Checkout", for: checkoutViewController)
- Call it on the main thread. The name is used as long as the view controller exists; pass
nilto use its type again. - While the view controller is on screen, each new name is logged as the next screen.
- If you call
startafter a screen appeared, for example after the user's consent, that screen is logged when it appears again or gets a new name.
What the reporter sees
The form contains:
- an email field, depending on the reporter email field mode;
- a description field;
- the screenshot, which the reporter can open and mark up to highlight the problem;
- the screen recording.
The reporter can remove the screenshot or the recording before sending.
What a bug report contains
- The reporter's description and, if collected, email address.
- The screenshot and screen recording, if enabled and not removed by the reporter.
- The activity log from before the report: console logs, network logs and app events. See logs retention.
- The name of the screen that was visible. See Screen names.
- Device and app details such as the device model, iOS version, app version and build, and locale.
- The user identifier and backend environment, if set.
- Your attachment, if a delegate is configured.
Privacy
The screen recording shows everything that was on the app's screen, including any text the user typed. It stays on the device and is uploaded only when the reporter sends a report. If your app shows sensitive content, consider disabling it with screenRecording: .disabled, or offering bug reporting only to beta testers or internal builds.
Troubleshooting
- Shaking does nothing: check that
bugReportingis enabled andinvocationEventscontains.shake. In the Simulator, use Device › Shake. - The form never opens from
invoke: check that bug reporting is enabled instartand thatinvokeis called afterstart. - The Send button stays disabled: the email field is required and the address is not valid. Use
.optionalor.hiddenif your users should not need one.