The Flutter SDK catches every error that reaches Dart. It cannot catch what never does: a segfault in a plugin's native code, a Swift force-unwrap in a native screen, an Objective-C exception from a system framework. For an app that is partly or entirely native, those are most of the crashes that matter.
The Swift SDK catches them, and posts them in the same shapes the Flutter SDK sends — so a native iOS crash and a Dart error land in the same Issues list, the same sessions, the same Release health page. You do not get a separate "iOS" corner of the dashboard to remember to check.
Install and start
It installs with Swift Package Manager from the public repo:
.package(url: "https://github.com/Zaga-ltd/sentinel_packages.git", branch: "main"),
// and in your target:
.product(name: "Sentrinel", package: "sentinel_packages"),
In Xcode, File → Add Package Dependencies…, paste the URL and add the Sentrinel library to your app target. Then, as early as you can:
import Sentrinel
Sentrinel.start(options: .init(
serverUrl: URL(string: "https://api.sentrinel.dev")!,
appName: "shop", // the project — the same app your backend reports into
env: "prod",
apiKey: "<a Mobile key>",
module: "ios",
release: "1.4.2"
))
No third-party dependencies — Foundation only — so it cannot conflict with anything else in your app.
What it catches
- Uncaught Objective-C exceptions, with name, reason and symbols.
- Swift traps — force-unwraps, out-of-bounds indexes,
fatalError. On arm64 these arrive asSIGTRAP, which is the one crash reporters most often forget. - Fatal signals: ABRT, BUS, FPE, ILL, SEGV, with return addresses.
- Errors you handle, with
Sentrinel.captureError(error)— reported as an error, and the session markederroredrather thancrashed.
A signal handler that is allowed to run
The hard part of native crash reporting is not catching the signal; it is what you are allowed to do once you have. A process that just segfaulted may have crashed inside the memory allocator, holding its lock. A handler that allocates — encodes JSON, builds a string, touches the file manager — can deadlock the dying process, and you get nothing.
So the report is pre-rendered while the app is healthy. When a signal arrives, the handler only adds the time, the signal name and the return addresses, and calls write(2) on a file descriptor opened at start — async-signal-safe operations only. It runs on an alternate stack, so a stack overflow on the main thread still has room to report. Then it hands the signal on to whatever was installed before: the system's own crash report, and any other reporter in the app, still see it. An exception and the abort() it ends in are reported once, not twice.
On the next launch, the report is sent — and only removed from disk once the server has acknowledged it. A launch without a network keeps it for the next try.
Sessions and release health
One session per foreground stretch, which is what crash-free rate divides by. On iOS the lifecycle is automatic: backgrounding ends the session with its duration and flushes everything, so the OS quietly killing a backgrounded app is not counted as abnormal. Back within 30 seconds, it is the same session.
Signed-out users are their own consumers — guest:<device id> per install — until you call Sentrinel.identify(user.id), and Sentrinel.identityHeaders gives you the two headers to add to requests to your own API, so your backend files server-side errors under the same person. See Every install is someone.
What it does not do yet
Stated plainly, because a monitoring SDK that overclaims is worse than one that underclaims:
- No symbolication. Signal reports carry raw return addresses and the image's load address; there is no dSYM upload yet.
- No tracing, product events, custom metrics or
beforeSend. Those are in the Flutter/Dart SDK; if your app is Flutter with native plugins, use both. - Watchdog terminations and OOM kills send no signal to the process, so nothing can catch them. They appear as
abnormalsessions — counted, but without a stack.
The Swift README has the full reference, including the manual lifecycle calls for macOS and app extensions.