To integrate Sentry into your Xcode

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
using Carthage, specify it in your Cartfile:

github "getsentry/sentry-cocoa" "8.13.0"

Run carthage update to download the framework and drag the built Sentry.xcframework into your Xcode project. We also provide a pre-built version for every release, which can be downloaded at releases on GitHub.

Sentry's Carthage setup generates 3 different frameworks:

  • Sentry
  • SentryPrivate
  • SentrySwiftUI

Sentry is required for all projects. SentrySwiftUI is required to measure the performance of your SwiftUI views. SentryPrivate is only needed if you changed the carthage build process to generate static frameworks.

Macs with Apple Silicon and XCFrameworks

If you're using Sentry via Carthage on Macs with Apple Silicon or want to use XCFrameworks, please use Carthage >= 0.37.0, which introduced support for XCFramework. Make sure to use carthage build --use-xcframeworks --no-use-binaries after running carthage update --use-xcframeworks. Carthage 0.37.0 needs to rebuild the XCFramework from source because it can't handle GitHub dependencies that download binaries. Learn more in their release notes.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").