Swift Package Manager (SPM)

To integrate Sentry into your Xcode project using Swift Package Manager (SPM), open your App in Xcode and open File -> Swift Packages -> Add Package Dependency. Then add the SDK by entering the git repo url https://github.com/getsentry/sentry-cocoa.git, and select a version (or branch) on the next page.

When using SPM version 5.2 or later, you must specify the the target name too:

Copied
.package(name: "Sentry", url: "https://github.com/getsentry/sentry-cocoa", from: "7.1.3"),

Version tags or branches need to have the Package.swift file in it or Xcode won't be able to install the package.

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").