iOS
Swift and Objective-C apps via
sentry-cocoa.Android
Java and Kotlin apps via
sentry-android.React Native
Cross-platform apps via
@sentry/react-native.iOS (Swift / Objective-C)
Installation
- Swift Package Manager
- CocoaPods
In Xcode, go to File → Add Package Dependencies and enter:Select version
8.0.0 or later. Or add it directly to Package.swift:Initialization
Initialize Sentry in yourAppDelegate or the @main entry point, before the rest of your app starts:
Capturing errors manually
Setting user context
Performance monitoring
iOS-specific features
| Feature | Description |
|---|---|
| Crash reporting | Captures Swift, Objective-C, and C/C++ crashes. |
| OOM detection | Detects out-of-memory terminations. |
| Slow/frozen frames | Tracks UI rendering performance. |
| Session tracking | Measures crash-free session and user rates. |
| App hangs | Detects when the main thread is unresponsive. |
| MetricKit integration | Correlates Sentry data with Apple’s MetricKit diagnostics. |
| View controllers | Automatic transaction per UIViewController load. |
Android
See the Java SDK page for full Android setup instructions, including installation via Gradle, manifest-based auto-init, andSentryAndroid.init().
The Android SDK supports the same mobile-specific features as iOS:
| Feature | Description |
|---|---|
| Crash reporting | Java, Kotlin, and NDK (C/C++) crashes. |
| ANR detection | Application Not Responding events with thread dump. |
| OOM detection | Out-of-memory terminations (experimental). |
| Slow/frozen frames | UI frame rate tracking. |
| Session tracking | Crash-free session and user rates. |
| Screenshot on crash | Optional screenshot attached to crash events. |
React Native
Installation
- Expo
- React Native CLI
Initialization
CallSentry.init() in your app entry point (index.js or App.tsx), before the root component renders:
Sentry.wrap to capture render errors:
Capturing errors manually
Setting user context
Performance monitoring
React Native-specific features
| Feature | Description |
|---|---|
| Native crash reporting | Captures crashes from both the JS layer and native iOS/Android code. |
| Slow/frozen frames | Tracks UI rendering on both iOS and Android. |
| Session tracking | Crash-free session and user rates. |
| Touch event breadcrumbs | Automatically records user touch interactions. |
| Navigation instrumentation | Automatic transactions for React Navigation and Expo Router. |
Session tracking
All three mobile SDKs track sessions automatically. A session starts when your app comes to the foreground and ends when it goes to the background or crashes. Sentry uses session data to calculate your app’s crash-free rate — the percentage of sessions that ended without a crash. You can view this on the Releases page in Sentry.Session tracking is enabled by default on all mobile SDKs. To disable it, set
options.enableAutoSessionTracking = false (iOS/Android) or autoSessionTracking: false (React Native).Debug symbols
For readable stack traces in production builds, upload debug symbols for each release:- iOS (dSYMs)
- Android (ProGuard)
- React Native