Skip to content

Crash Reports

Appelium provides an in-process live crash reporting. When enabled, Appelium detects crashes and generates reports to help your investigation and troubleshooting with the information of application, system, process, thread, etc. as well as stack traces.

What crash reports contain

Each crash report includes:

  • Stack traces for all threads at the time of the crash, with the crashing thread highlighted.
  • On-device symbolication of crash-relevant frames where symbol information is available.
  • Application logs captured up to the moment of the crash.
  • Current view name visible at the time of the crash.
  • Resource usage averages (CPU and memory) for the session.
  • Crash metadata including crash timestamp, app launch timestamp, and a unique crash report identifier.

Enabling crash reporting

As all Appelium SDK features, crash reporting is off by default and needs to be explicitly enabled during Appelium initialization:

AppeliumFeedback.start(
    apiKey: <#api key#>,
    crashReporting: .enabled()
)

Debugger detection

In Release builds, crash reporting is automatically disabled when a debugger is attached. This prevents the crash reporter from interfering with the debugger. If crash reports are not being captured during debugging, this is the expected behavior.

Checking for crashes in the previous session

You can check whether the app crashed in the previous session using the hasCrashedInLastSession property. This is available immediately after start() returns:

if AppeliumFeedback.hasCrashedInLastSession {
    // React to previous crash, e.g. show a recovery message
}

Attaching data to crash reports

Optionally set a delegate in your CrashReportingConfiguration and implement the CrashReportingDelegate protocol to attach additional data to crash reports:

AppeliumFeedback.start(
    apiKey: <#api key#>,
    crashReporting: .enabled(delegate: self)
)
1
2
3
4
func crashReportAttachment() -> ReportAttachment {
    let attachmentData: Data = // Load the content of your attachment
    return ReportAttachment(fileName: "logs.txt", data: attachmentData)
}

Note

Each file attachment is limited to 100KB. If longer data is passed, only the last 100KB will be used.

Attaching user identifiers

In order to attach a user identifier to each crash report you can use the following APIs:

AppeliumFeedback.setUserIdentifier("ABC-12345")

Note that the identifier is limited to max 50 characters.

Symbolication

In order to have crash reports properly symbolicated, it is necessary to upload dSYM files to Appelium. See Symbols Files REST APIs for more details.