Swift Package Manager (SPM)

To integrate Sentry into your Xcode project using Swift Package Manager (SPM), open your App in Xcode and open File > Add Packages. Then add the SDK by entering the git repo url in the top right search field:

Copied
https://github.com/getsentry/sentry-cocoa.git

You can define your dependency rule by selecting the SDK version (or branch), and then click the "Add Package" button.

Alternatively, when using SPM version 5.2 or later and your project uses Package.swift file to manage dependencies, you can specify the target with name:

Copied
.package(name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa", from: "7.31.3"),
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").