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: "8.32.0"),

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