Skip to content

Silent bug-report invocation

Silent invocation uploads a bug report directly instead of presenting Appelium's report form. It is useful for a customer-support action, an app-detected failure state or a clearly labelled custom reporting UI.

Bug reporting must already be enabled. The method is asynchronous, captures the current activity log, optionally a screenshot, the configured bug-report attachment and the current view, then uploads the report. It does not present Appelium UI or include the automatic screen recording shown in the interactive flow.

func sendSupportReport() async {
    do {
        try await AppeliumFeedback.invokeSilently(
            reporterEmail: currentUserEmail,
            title: "Checkout support report"
        )
        presentConfirmation()
    } catch {
        presentUploadError(error)
    }
}

Both arguments are optional:

  • title identifies the report in the Dashboard;
  • reporterEmail stores the reporter contact only if the application intentionally supplies it.

Do not call silent invocation automatically from ordinary recoverable events without a clear user expectation. It uploads diagnostics and counts toward bug-report data.

Capture useful context

Write the relevant state before invoking:

AppeliumFeedback.logWarning(
    "Checkout entered recovery flow after timeout",
    domain: "Checkout"
)

do {
    try await AppeliumFeedback.invokeSilently(
        title: "Checkout timeout: recovery flow"
    )
} catch {
    // Handle the upload failure in the app's own UI.
}

Use the title for a stable human-readable summary. Put transient values and structured context into Appelium logs rather than generating a unique title for every request.

Add screenshots and custom attachments

Silent invocation uses the screenshot setting from BugReportingConfiguration. It also calls the configured BugReportingDelegate attachment, so the same file can be added to interactive and silent reports.

Keep the attachment small and redact personal or secret values. See Attachments for the SDK's 100,000-byte limit and safe loading examples.

Disable automatic gestures

Silent invocation is a different control from the shake gesture. If the app only reports through its own UI, disable invocation events during initialization:

AppeliumFeedback.start(
    apiKey: "YOUR_APP_TOKEN",
    bugReporting: .enabled(invocationEvents: [])
)

If the configuration should still support shake or another invocation event, do not pass an empty list.

Handle failure

invokeSilently throws when the upload fails. A missing enabled configuration does not present UI; check that the bug-reporting feature is enabled in the initial start call and observe the async error for network and authentication failures.