diff --git a/docs/platforms/apple/common/install/carthage.mdx b/docs/platforms/apple/common/install/carthage.mdx index 8b2011066db7b..3abd307500e3d 100644 --- a/docs/platforms/apple/common/install/carthage.mdx +++ b/docs/platforms/apple/common/install/carthage.mdx @@ -5,7 +5,7 @@ sidebar_order: 8000 --- -We dropped official support for Carthage in v9. If you're using Carthage, please migrate to Swift Package Manager (SPM) or CocoaPods. +We dropped official support for Carthage in v9. If you're using Carthage, please migrate to Swift Package Manager (SPM) or manually install the [pre-built XCFramework from GitHub releases](https://github.com/getsentry/sentry-cocoa/releases). To integrate Sentry into your Xcode project using Carthage, specify it in your _Cartfile_: diff --git a/docs/platforms/apple/common/install/cocoapods.mdx b/docs/platforms/apple/common/install/cocoapods.mdx index c3d89fccc4a24..e1df9b83ccb30 100644 --- a/docs/platforms/apple/common/install/cocoapods.mdx +++ b/docs/platforms/apple/common/install/cocoapods.mdx @@ -1,9 +1,13 @@ --- -title: Cocoapods +title: CocoaPods (Deprecated) description: "Learn about installing the Sentry SDK with CocoaPods." sidebar_order: 2000 --- + +CocoaPods will not receive any new updates after June 2026. We recommend migrating to Swift Package Manager (SPM) or manually installing the [pre-built XCFramework from GitHub releases](https://github.com/getsentry/sentry-cocoa/releases). + + To integrate Sentry into your Xcode project using CocoaPods, specify it in your _Podfile_: ```ruby diff --git a/docs/platforms/apple/common/migration/index.mdx b/docs/platforms/apple/common/migration/index.mdx index 7bdae7094ab65..63cdb96f5e52a 100644 --- a/docs/platforms/apple/common/migration/index.mdx +++ b/docs/platforms/apple/common/migration/index.mdx @@ -25,7 +25,7 @@ Additionally, the Package.swift sets `swift-tools-version` to 6.0. ### Carthage Support Dropped -We dropped official support for Carthage in v9. If you're using Carthage, please migrate to Swift Package Manager (SPM) or CocoaPods. +We dropped official support for Carthage in v9. If you're using Carthage, please migrate to Swift Package Manager (SPM) or manually install the [pre-built XCFramework from GitHub releases](https://github.com/getsentry/sentry-cocoa/releases). ### Features Enabled by Default diff --git a/docs/platforms/apple/common/session-replay/index.mdx b/docs/platforms/apple/common/session-replay/index.mdx index 888e3bc2b66fd..0296d2dedcc95 100644 --- a/docs/platforms/apple/common/session-replay/index.mdx +++ b/docs/platforms/apple/common/session-replay/index.mdx @@ -61,14 +61,6 @@ If you already have the SDK installed, you can update it to the latest version w .package(url: "https://github.com/getsentry/sentry-cocoa", from: "{{@inject packages.version('sentry.cocoa') }}"), ``` -```ruby {tabTitle:CocoaPods} -pod update -``` - -```ruby {tabTitle:Carthage} -github "getsentry/sentry-cocoa" "{{@inject packages.version('sentry.cocoa') }}" -``` - ## Set Up To set up the integration, add the following to your Sentry initialization. diff --git a/docs/platforms/apple/common/tracing/instrumentation/swiftui-instrumentation.mdx b/docs/platforms/apple/common/tracing/instrumentation/swiftui-instrumentation.mdx index 52ec6cc137031..b416f0aeaa0e6 100644 --- a/docs/platforms/apple/common/tracing/instrumentation/swiftui-instrumentation.mdx +++ b/docs/platforms/apple/common/tracing/instrumentation/swiftui-instrumentation.mdx @@ -10,18 +10,9 @@ og_image: >- This feature is stable since version 8.17.0. -You can monitor the performance of your views in a SwiftUI project with the SentrySwiftUI library, which you can install via SPM (Swift package manager) or CocoaPods: +You can monitor the performance of your views in a SwiftUI project with the SentrySwiftUI library, which you can install via SPM (Swift Package Manager). -```ruby -platform :ios, '13.0' -use_frameworks! # This is required - -target 'YourApp' do - pod 'SentrySwiftUI', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '{{@inject packages.version('sentry.cocoa') }}' -end -``` - -> If you plan to add _SentrySwiftUI_, you don`t need to also add _Sentry_ library since the former depends on the latter. +> If you plan to add _SentrySwiftUI_, you don't need to also add _Sentry_ library since the former depends on the latter. In order to start monitoring the performance of your views, you need to wrap it with `SentryTracedView`, like this: diff --git a/docs/platforms/apple/common/troubleshooting/index.mdx b/docs/platforms/apple/common/troubleshooting/index.mdx index 8b985c131b447..356ee5a015614 100644 --- a/docs/platforms/apple/common/troubleshooting/index.mdx +++ b/docs/platforms/apple/common/troubleshooting/index.mdx @@ -143,6 +143,10 @@ We introduced a bug with a refactoring [#4101](https://github.com/getsentry/sent ## Sandbox Error Using Cocoapods + +CocoaPods will not receive any new updates after June 2026. We recommend migrating to Swift Package Manager (SPM) or manually installing the [pre-built XCFramework from GitHub releases](https://github.com/getsentry/sentry-cocoa/releases). + + After setting up Cocoapods using a `Podfile` and running `pod install` to set up the project, you might see the following error when building the target: ``` diff --git a/docs/platforms/apple/common/user-feedback/index.mdx b/docs/platforms/apple/common/user-feedback/index.mdx index f802e2cd9e3b6..a7f35fdff1f05 100644 --- a/docs/platforms/apple/common/user-feedback/index.mdx +++ b/docs/platforms/apple/common/user-feedback/index.mdx @@ -29,7 +29,7 @@ Ensure that your project is set up with Sentry and that you have added the Sentr ### Installation -1. Install the Sentry Cocoa SDK using CocoaPods, Carthage, or Swift Package Manager. +1. Install the Sentry Cocoa SDK using Swift Package Manager or by manually adding the [pre-built XCFramework from GitHub releases](https://github.com/getsentry/sentry-cocoa/releases). 2. Ensure you are using version 8.46.0 or above of the SDK to access the latest features. ### Set Up diff --git a/includes/apple-platform-getting-started.mdx b/includes/apple-platform-getting-started.mdx index b326cccd289ab..10346fbb4957d 100644 --- a/includes/apple-platform-getting-started.mdx +++ b/includes/apple-platform-getting-started.mdx @@ -71,7 +71,7 @@ If you prefer, you can also [set up the SDK manually](/platforms/apple/guides/io -- Install the Sentry SDK via Swift Package Manager or Cocoapods +- Install the Sentry SDK via Swift Package Manager - Update your `AppDelegate` or SwiftUI App Initializer with the default Sentry configuration and an example error - Add a new `Upload Debug Symbols` phase to your `xcodebuild` build script - Create `.sentryclirc` with an auth token to upload debug symbols (this file is automatically added to `.gitignore`) diff --git a/public/_platforms/apple/ios-profiling-onboarding-1-install.json b/public/_platforms/apple/ios-profiling-onboarding-1-install.json index 009498b0fac65..71534fa61a825 100644 --- a/public/_platforms/apple/ios-profiling-onboarding-1-install.json +++ b/public/_platforms/apple/ios-profiling-onboarding-1-install.json @@ -1 +1 @@ -{"key":"apple.ios-profiling-onboarding-1-install","type":"language","doc_link":"https://docs.sentry.io/platforms/apple/guides/ios/profiling/","name":"iOS","aliases":[],"categories":[],"body":"

Install

\n

For the Profiling integration to work, you must have the Sentry Cocoa package (minimum version 8.12.0). We offer installation methods for Carthage (shown below), CocoaPods, and Swift Package Manager. Learn more about installation methods in our full documentation.

\n
github \"getsentry/sentry-cocoa\" \"8.19.0\"
"} \ No newline at end of file +{"key":"apple.ios-profiling-onboarding-1-install","type":"language","doc_link":"https://docs.sentry.io/platforms/apple/guides/ios/profiling/","name":"iOS","aliases":[],"categories":[],"body":"

Install

\n

For the Profiling integration to work, you must have the Sentry Cocoa package (minimum version 8.12.0). We offer installation methods for Carthage (shown below) and Swift Package Manager. CocoaPods is deprecated and will not receive updates after June 2026. Learn more about installation methods in our full documentation.

\n
github \"getsentry/sentry-cocoa\" \"8.19.0\"
"} \ No newline at end of file diff --git a/public/_platforms/apple/ios.json b/public/_platforms/apple/ios.json index 3d55f5434eb44..b9a6272aa59aa 100644 --- a/public/_platforms/apple/ios.json +++ b/public/_platforms/apple/ios.json @@ -1 +1 @@ -{"key":"apple.ios","type":"language","doc_link":"https://docs.sentry.io/platforms/apple/","name":"iOS","aliases":[],"categories":["mobile"],"body":"

Install

\n

We recommend installing the SDK with Swift Package Manager (SPM), but we also support alternate installation methods. To integrate Sentry into your Xcode

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
using 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:

\n
https://github.com/getsentry/sentry-cocoa.git
\n

Alternatively, when your project uses a Package.swift file to manage dependencies, you can specify the target with:

\n
.package(url: \"https://github.com/getsentry/sentry-cocoa\", from: \"8.19.0\"),
\n

Configure

\n

Make sure you initialize the SDK as soon as possible in your application lifecycle e.g. in your AppDelegate application:didFinishLaunchingWithOptions method:

\n
import Sentry\n\n// ....\n\nfunc application(_ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n\n    SentrySDK.start { options in\n        options.dsn = \"___PUBLIC_DSN___\"\n        options.debug = true // Enabled debug when first installing is always helpful\n\n        // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n        // We recommend adjusting this value in production.\n        options.tracesSampleRate = 1.0\n    }\n\n    return true\n}
\n

When using SwiftUI and your app doesn't implement an app delegate, initialize the SDK within the App conformer's initializer:

\n
import Sentry\n\n@main\nstruct SwiftUIApp: App {\n    init() {\n        SentrySDK.start { options in\n            options.dsn = \"___PUBLIC_DSN___\"\n            options.debug = true // Enabled debug when first installing is always helpful\n\n            // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n            // We recommend adjusting this value in production.\n            options.tracesSampleRate = 1.0\n        }\n    }\n}
\n

Verify

\n

This snippet contains an intentional error you can use to test that errors are uploaded to Sentry correctly. You can add it to your main ViewController.

\n
let button = UIButton(type: .roundedRect)\nbutton.frame = CGRect(x: 20, y: 50, width: 100, height: 30)\nbutton.setTitle(\"Break the world\", for: [])\nbutton.addTarget(self, action: #selector(self.breakTheWorld(_:)), for: .touchUpInside)\nview.addSubview(button)\n\n@IBAction func breakTheWorld(_ sender: AnyObject) {\n    fatalError(\"Break the world\")\n}
\n

Experimental Features

\n
\n

Want to play with some new features? Try out our experimental features for View Hierarchy, Time to Full Display (TTFD), MetricKit, Prewarmed App Start Tracing, and Swift Async Stacktraces. Experimental features are still a work-in-progress and may have bugs. We recognize the irony.

\n

Let us know if you have feedback through GitHub issues.

\n
\n
import Sentry\n\nSentrySDK.start { options in\n    // ...\n\n    // Enable all experimental features\n    options.attachViewHierarchy = true\n    options.enablePreWarmedAppStartTracing = true\n    options.enableMetricKit = true\n    options.enableTimeToFullDisplayTracing = true\n    options.swiftAsyncStacktraces = true\n}
\n
\n

Next Steps

\n"} +{"key":"apple.ios","type":"language","doc_link":"https://docs.sentry.io/platforms/apple/","name":"iOS","aliases":[],"categories":["mobile"],"body":"

Install

\n

We recommend installing the SDK with Swift Package Manager (SPM), but we also support alternate installation methods. To integrate Sentry into your Xcode

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
using 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:

\n
https://github.com/getsentry/sentry-cocoa.git
\n

Alternatively, when your project uses a Package.swift file to manage dependencies, you can specify the target with:

\n
.package(url: \"https://github.com/getsentry/sentry-cocoa\", from: \"8.19.0\"),
\n

Configure

\n

Make sure you initialize the SDK as soon as possible in your application lifecycle e.g. in your AppDelegate application:didFinishLaunchingWithOptions method:

\n
import Sentry\n\n// ....\n\nfunc application(_ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n\n    SentrySDK.start { options in\n        options.dsn = \"___PUBLIC_DSN___\"\n        options.debug = true // Enabled debug when first installing is always helpful\n\n        // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n        // We recommend adjusting this value in production.\n        options.tracesSampleRate = 1.0\n    }\n\n    return true\n}
\n

When using SwiftUI and your app doesn't implement an app delegate, initialize the SDK within the App conformer's initializer:

\n
import Sentry\n\n@main\nstruct SwiftUIApp: App {\n    init() {\n        SentrySDK.start { options in\n            options.dsn = \"___PUBLIC_DSN___\"\n            options.debug = true // Enabled debug when first installing is always helpful\n\n            // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n            // We recommend adjusting this value in production.\n            options.tracesSampleRate = 1.0\n        }\n    }\n}
\n

Verify

\n

This snippet contains an intentional error you can use to test that errors are uploaded to Sentry correctly. You can add it to your main ViewController.

\n
let button = UIButton(type: .roundedRect)\nbutton.frame = CGRect(x: 20, y: 50, width: 100, height: 30)\nbutton.setTitle(\"Break the world\", for: [])\nbutton.addTarget(self, action: #selector(self.breakTheWorld(_:)), for: .touchUpInside)\nview.addSubview(button)\n\n@IBAction func breakTheWorld(_ sender: AnyObject) {\n    fatalError(\"Break the world\")\n}
\n

Experimental Features

\n
\n

Want to play with some new features? Try out our experimental features for View Hierarchy, Time to Full Display (TTFD), MetricKit, Prewarmed App Start Tracing, and Swift Async Stacktraces. Experimental features are still a work-in-progress and may have bugs. We recognize the irony.

\n

Let us know if you have feedback through GitHub issues.

\n
\n
import Sentry\n\nSentrySDK.start { options in\n    // ...\n\n    // Enable all experimental features\n    options.attachViewHierarchy = true\n    options.enablePreWarmedAppStartTracing = true\n    options.enableMetricKit = true\n    options.enableTimeToFullDisplayTracing = true\n    options.swiftAsyncStacktraces = true\n}
\n
\n

Next Steps

\n"} diff --git a/public/_platforms/apple/macos.json b/public/_platforms/apple/macos.json index 40a20d2a002ef..b5f96c90c2ef7 100644 --- a/public/_platforms/apple/macos.json +++ b/public/_platforms/apple/macos.json @@ -1 +1 @@ -{"key":"apple.macos","type":"language","doc_link":"https://docs.sentry.io/platforms/apple/","name":"macOS","aliases":[],"categories":["desktop"],"body":"

We support installing the SDK with CocoaPods, Swift Package Manager, and Carthage.

\n

CocoaPods

\n

To integrate Sentry into your Xcode

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

\n
platform :ios, '11.0'\nuse_frameworks! # This is important\n\ntarget 'YourApp' do\n  pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '8.19.0'\nend
\n

Afterwards run pod install. For more information visit the docs.

\n

Swift Package Manager

\n

To integrate Sentry into your Xcode

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
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:

\n
https://github.com/getsentry/sentry-cocoa.git
\n

Alternatively, when your project uses a Package.swift file to manage dependencies, you can specify the target with:

\n
.package(url: \"https://github.com/getsentry/sentry-cocoa\", from: \"8.19.0\"),
\n

For more information visit the docs.

\n

Carthage

\n

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:

\n
github \"getsentry/sentry-cocoa\" \"8.19.0\"
\n

Run carthage update to download the framework and drag the built Sentry.framework into your Xcode project. For more information visit the docs.

\n

Configuration

\n

Make sure you initialize the SDK as soon as possible in your application lifecycle e.g. in your AppDelegate application:didFinishLaunchingWithOptions method:

\n
import Sentry\n\n// ....\n\nfunc application(_ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n\n    SentrySDK.start { options in\n        options.dsn = \"___PUBLIC_DSN___\"\n        options.debug = true // Enabled debug when first installing is always helpful\n\n        // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n        // We recommend adjusting this value in production.\n        options.tracesSampleRate = 1.0\n    }\n\n    return true\n}
\n

When using SwiftUI and your app doesn't implement an app delegate, initialize the SDK within the App conformer's initializer:

\n
import Sentry\n\n@main\nstruct SwiftUIApp: App {\n    init() {\n        SentrySDK.start { options in\n            options.dsn = \"___PUBLIC_DSN___\"\n            options.debug = true // Enabled debug when first installing is always helpful\n\n            // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n            // We recommend adjusting this value in production.\n            options.tracesSampleRate = 1.0\n        }\n    }\n}
\n

Debug Symbols

\n

To capture crashes, you need to provide debug information to Sentry. You can also use our source context feature to display code snippets next to the event stack traces by enabling the include-sources option when uploading your debug information files. Debug information is provided by uploading dSYM files.

\n

Performance Monitoring

\n

You can measure the performance of your code by capturing transactions and spans.

\n
import Sentry // Make sure you import Sentry\n\n// Transaction can be started by providing, at minimum, the name and the operation\nlet transaction = SentrySDK.startTransaction(name: \"Update Repos\", operation: \"db\")\n// Transactions can have child spans (and those spans can have child spans as well)\nlet span = transaction.startChild(operation: \"db\", description: \"Update first repo\")\n\n// ...\n// (Perform the operation represented by the span/transaction)\n// ...\n\nspan.finish() // Mark the span as finished\ntransaction.finish() // Mark the transaction as finished and send it to Sentry
\n

Check out the documentation to learn more about the API and automatic instrumentations.

"} +{"key":"apple.macos","type":"language","doc_link":"https://docs.sentry.io/platforms/apple/","name":"macOS","aliases":[],"categories":["desktop"],"body":"

We recommend Swift Package Manager. We also support Carthage. CocoaPods is deprecated and will not receive updates after June 2026.

\n

CocoaPods (Deprecated)

\n

To integrate Sentry into your Xcode

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

\n
platform :ios, '11.0'\nuse_frameworks! # This is important\n\ntarget 'YourApp' do\n  pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '8.19.0'\nend
\n

Afterwards run pod install. For more information visit the docs.

\n

Swift Package Manager

\n

To integrate Sentry into your Xcode

projectRepresents your service in Sentry and allows you to scope events to a distinct application.
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:

\n
https://github.com/getsentry/sentry-cocoa.git
\n

Alternatively, when your project uses a Package.swift file to manage dependencies, you can specify the target with:

\n
.package(url: \"https://github.com/getsentry/sentry-cocoa\", from: \"8.19.0\"),
\n

For more information visit the docs.

\n

Carthage

\n

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:

\n
github \"getsentry/sentry-cocoa\" \"8.19.0\"
\n

Run carthage update to download the framework and drag the built Sentry.framework into your Xcode project. For more information visit the docs.

\n

Configuration

\n

Make sure you initialize the SDK as soon as possible in your application lifecycle e.g. in your AppDelegate application:didFinishLaunchingWithOptions method:

\n
import Sentry\n\n// ....\n\nfunc application(_ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n\n    SentrySDK.start { options in\n        options.dsn = \"___PUBLIC_DSN___\"\n        options.debug = true // Enabled debug when first installing is always helpful\n\n        // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n        // We recommend adjusting this value in production.\n        options.tracesSampleRate = 1.0\n    }\n\n    return true\n}
\n

When using SwiftUI and your app doesn't implement an app delegate, initialize the SDK within the App conformer's initializer:

\n
import Sentry\n\n@main\nstruct SwiftUIApp: App {\n    init() {\n        SentrySDK.start { options in\n            options.dsn = \"___PUBLIC_DSN___\"\n            options.debug = true // Enabled debug when first installing is always helpful\n\n            // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n            // We recommend adjusting this value in production.\n            options.tracesSampleRate = 1.0\n        }\n    }\n}
\n

Debug Symbols

\n

To capture crashes, you need to provide debug information to Sentry. You can also use our source context feature to display code snippets next to the event stack traces by enabling the include-sources option when uploading your debug information files. Debug information is provided by uploading dSYM files.

\n

Performance Monitoring

\n

You can measure the performance of your code by capturing transactions and spans.

\n
import Sentry // Make sure you import Sentry\n\n// Transaction can be started by providing, at minimum, the name and the operation\nlet transaction = SentrySDK.startTransaction(name: \"Update Repos\", operation: \"db\")\n// Transactions can have child spans (and those spans can have child spans as well)\nlet span = transaction.startChild(operation: \"db\", description: \"Update first repo\")\n\n// ...\n// (Perform the operation represented by the span/transaction)\n// ...\n\nspan.finish() // Mark the span as finished\ntransaction.finish() // Mark the transaction as finished and send it to Sentry
\n

Check out the documentation to learn more about the API and automatic instrumentations.

"}