https://github.com/getsentry/sentry-cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://github.com/getsentry/sentry-cocoa
cocoa crash crash-reporting crash-reports error-handler error-monitoring hacktoberfest ios macos objective-c sdk sentry swift tag-production team-mobile tvos watchos
Last synced: 2 months ago
JSON representation
The official Sentry SDK for iOS, tvOS, macOS, watchOS.
- Host: GitHub
- URL: https://github.com/getsentry/sentry-cocoa
- Owner: getsentry
- License: mit
- Created: 2016-04-05T18:55:09.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T09:47:25.000Z (9 months ago)
- Last Synced: 2025-04-08T10:08:25.702Z (9 months ago)
- Topics: cocoa, crash, crash-reporting, crash-reports, error-handler, error-monitoring, hacktoberfest, ios, macos, objective-c, sdk, sentry, swift, tag-production, team-mobile, tvos, watchos
- Language: Swift
- Homepage: https://sentry.io/for/cocoa/
- Size: 21.6 MB
- Stars: 866
- Watchers: 65
- Forks: 341
- Open Issues: 322
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
_Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us [**Check out our open positions**](https://sentry.io/careers/)_
> [!NOTE]
> You are currently viewing the **`main`** branch which contains the upcoming **v9** release with breaking changes.
>
> For the stable **v8** release, please switch to the [`v8.x` branch](https://github.com/getsentry/sentry-cocoa/tree/v8.x) and refer to the [v8 CHANGELOG](https://github.com/getsentry/sentry-cocoa/blob/v8.x/CHANGELOG.md).
# Official Sentry SDK for iOS / tvOS / macOS / watchOS (1)
[](https://github.com/getsentry/sentry-cocoa/actions/workflows/build.yml?query=branch%3Amain)
[](https://codecov.io/gh/getsentry/sentry-cocoa)
[](https://cocoapods.org/pods/Sentry)
[](https://github.com/Carthage/Carthage)
[](https://swift.org/package-manager)

[](https://swiftpackageindex.com/getsentry/sentry-cocoa)
[](https://x.com/intent/follow?screen_name=sentry)
[](https://discord.com/invite/sentry)
# Installation
SPM is the recommended way to include Sentry into your project, but we also support [CocoaPods](https://cocoapods.org/pods/Sentry) and Carthage, and provide pre-built XCFrameworks on [our GitHub Releases page](https://github.com/getsentry/sentry-cocoa/releases).
# Initialization
_Remember to call this as early in your application life cycle as possible_
Ideally in `applicationDidFinishLaunching` in `AppDelegate`
```swift
import Sentry
// ....
SentrySDK.start { options in
options.dsn = "___PUBLIC_DSN___"
options.debug = true // Helpful to see what's going on
}
```
```objc
@import Sentry;
// ....
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
options.dsn = @"___PUBLIC_DSN___";
options.debug = @YES; // Helpful to see what's going on
}];
```
For more information checkout the [docs](https://docs.sentry.io/platforms/apple).
(1)limited symbolication support and no crash handling.
# Blog posts
[Mobile Vitals - Four Metrics Every Mobile Developer Should Care About](https://blog.sentry.io/2021/08/23/mobile-vitals-four-metrics-every-mobile-developer-should-care-about/).
[How to use Sentry Attachments with Mobile Applications](https://blog.sentry.io/2021/02/03/how-to-use-sentry-attachments-with-mobile-applications/?utm_source=github&utm_medium=readme&utm_campaign=sentry-cocoa).
[Close the Loop with User Feedback](https://blog.sentry.io/2021/02/16/close-the-loop-with-user-feedback/?utm_source=github&utm_medium=readme&utm_campaign=sentry-cocoa).
[A Sanity Listicle for Mobile Developers](https://blog.sentry.io/2021/03/30/a-sanity-listicle-for-mobile-developers/?utm_source=github&utm_medium=readme&utm_campaign=sentry-cocoa).
# Resources
- [](https://docs.sentry.io/platforms/apple/)
- [](https://github.com/getsentry/sentry-cocoa/discussions)
- [](https://discord.com/invite/sentry)
- [](http://stackoverflow.com/questions/tagged/sentry)
- [](https://github.com/getsentry/.github/blob/master/CODE_OF_CONDUCT.md)
- [](https://twitter.com/intent/follow?screen_name=getsentry)