Skip to main content

Introduction

Lerix captures errors and crashes from your native iOS app so you can debug issues faster. After you complete the iOS installation, use Lerix.throwError to send custom errors or caught exceptions to your dashboard — uncaught crashes are captured automatically, with no extra code required.
Make sure you have initialized the SDK with Lerix.initialize() before reporting errors.

Report an error

Use Lerix.throwError to manually report an error. This is useful when you catch an error yourself and want to send it to Lerix with extra context.

Parameters

BugType values

BugSeverity values

Automatic crash capture

Lerix.initialize() installs a crash handler by default, covering both:
  • Uncaught exceptions (NSException — e.g. an unimplemented selector, an invalid collection operation).
  • Fatal signals (SIGABRT, SIGILL, SIGSEGV, SIGFPE, SIGBUS, SIGTRAP) — this is what catches typical Swift runtime traps: force-unwrapping nil, an array index out of range, a failed precondition, and similar.
A crash can’t reliably make a network call — the process is already terminating — so the report is written to disk synchronously at crash time, then sent automatically the next time your app launches, tagged type: .crash, severity: .critical. You don’t need to do anything to receive it; it shows up in the dashboard on the following launch. To disable it (e.g. if your app already has its own crash reporter and you only want manual throwError calls):
Stack traces are symbolicated using the app’s own debug symbols at the time of the crash, so a Release build with symbols stripped may show addresses instead of function names for some frames — this is a normal characteristic of native crash reporting, not a bug in the SDK.

Verify the integration

Throw a test error to confirm everything is working:
Then open your dashboard — the error should appear within seconds.