Prerequisites
- RUM is set up in your application. See iOS Monitoring Setup.
- The
AtatusCrashReportingproduct is added to your target, for crash reporting.
Enable crash reporting
Crash reporting is a separate product. Enable it after RUM:CrashReporting.enable() takes no options.
What is captured
The SDK installs handlers for the failures that kill a process:- Fatal signals, such as
SIGSEGV,SIGABRT,SIGBUS,SIGILL,SIGFPE, andSIGTRAP. - Uncaught Objective-C and Swift exceptions.
- Uncaught C++ exceptions.
A crash is only reported if tracking consent was
.granted during the run that crashed. One pending report is kept at a time, so two crashes in quick succession report the most recent one.Read a crash report
Crash reports leave the device unsymbolicated: each frame is a memory address plus the binary image it belongs to. Atatus resolves those addresses into file names, functions, and line numbers using the debug symbols for the exact build that crashed. That makes the dSYM files part of every release you ship. Keep them for each build, including App Store builds, where Xcode rebuilds the binary and generates new dSYMs that you download from the Organizer or from your CI artifacts. Without the matching dSYMs, a report shows addresses only. Stack traces are capped at 200 frames. When a stack is longer, frames are dropped from the middle so the crash site and the entry point both survive, and the report is marked as truncated.Report app hangs
An app hang is the main thread blocking long enough that the interface stops responding. Detection is off by default. Turn it on with a threshold in seconds:AppHang, not as long tasks. A hang that the application never recovers from, because the user force-quit it or the system killed it, is reported on the next launch as a fatal hang.
Pick a threshold you will act on.
0.25 seconds catches interface stalls a user notices, while a lower value reports work that is invisible in practice and produces volume you will learn to ignore. Hangs are only detected in the main application, not in app extensions or widgets.Report watchdog terminations
iOS kills an application that uses too much memory, takes too long to launch, or stops responding to the system. These terminations never reach a crash handler, so the SDK infers them on the next launch:WatchdogTermination and no stack trace, because none exists. One case it cannot distinguish: a user force-quitting your application from the app switcher while it is in the foreground is reported as a watchdog termination.
Report memory warnings
Memory warnings are reported as errors by default, which is how you find the screens that precede an out-of-memory termination:MemoryWarning and no stack trace, attributed to the view that was active.
Report errors yourself
A failure your code handles still matters, because a retry loop or an empty screen is invisible in crash data. Report it:.source for your own code, .network for a request, .webview for embedded web content, .console, .logger, and .custom. The default is .custom. When you omit the stack, the SDK records the file and line of the call.
Group errors with a fingerprint
Errors are grouped by their message and stack trace, so a message that embeds an identifier splits one problem into many. Set a fingerprint to group them yourself:The fingerprint applies to errors you report and to failed resources. Crashes, fatal hangs, watchdog terminations, and memory warnings are grouped by the SDK and cannot be fingerprinted this way.
Redact or drop errors
An error event mapper runs on every error before it is uploaded. Use it to strip sensitive content, or returnnil to drop the error:
Errors from logs
Logs written aterror or critical are also reported as RUM errors, with the source logger. See Log Collection.
Objective-C
appHangThreshold is a plain NSTimeInterval where 0 means disabled, and addError takes no error type.
Platform support
Next steps
- Measure launch time, hangs, and frame rate with Mobile Vitals.
- Watch a failing session back with Session Replay.
- Forward your application logs with Log Collection.