diff --git a/docs/platforms/apple/common/index.mdx b/docs/platforms/apple/common/index.mdx
index efe61f05418b60..2e9b0c775e3315 100644
--- a/docs/platforms/apple/common/index.mdx
+++ b/docs/platforms/apple/common/index.mdx
@@ -1,427 +1,7 @@
-On this page, we get you up and running with Sentry's Apple SDK, which will automatically report errors and exceptions in your application.
+---
+title: iOS
+sidebar_order: 10
+description: Learn how to use Sentry's Apple SDK to automatically report errors, crashes, watchdog terminations, and app hangs in your application.
+---
-
-
-If you don't already have an account and Sentry project established, head over to [sentry.io](https://sentry.io/signup/), then return to this page.
-
-
-
-
-
-
-
-The support for [visionOS](https://developer.apple.com/visionos/) is currently experimental, which means it may have bugs. We recognize the irony.
-
-
-
-
-
-## Features
-
-
-
-In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/).
-
-
-
-
-
-In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/).
-
-
-
-Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
-
-## Install
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Sentry captures data by using an SDK within your application's runtime. These are platform-specific and allow Sentry to have a deep understanding of how your application works.
-
-
-
-We recommend installing the SDK with Swift Package Manager (SPM), but we also support alternate [installation methods](install/). To integrate Sentry into your Xcode project, 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:
-
-```
-https://github.com/getsentry/sentry-cocoa.git
-```
-
-
-
-
-We recommend installing the SDK through our [Sentry Wizard](https://github.com/getsentry/sentry-wizard) by running the following command inside your project directory:
-
-```bash
-brew install getsentry/tools/sentry-wizard && sentry-wizard -i ios
-```
-
-This will patch your project and configure the SDK. You'll only need to patch the project once, then you'll be able to add the patched files to your version control system.
-If you prefer, you can also [set up the SDK manually](/platforms/apple/guides/ios/manual-setup/) or follow the instructions below to adapt the [configuration](#configure).
-
-
-
-- Install the Sentry SDK via Swift Package Manager or Cocoapods
-- 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`)
-- If you're using Fastlane, a lane for uploading debug symbols to Sentry will be added
-
-
-
-
-
-## Configure
-
-
-
-To capture all errors, initialize the SDK as soon as possible, such as in your `AppDelegate` `application:didFinishLaunchingWithOptions` method:
-
-
-
-
-
-```swift {tabTitle:Swift}
-import Sentry
-
-func application(_ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
-
- SentrySDK.start { options in
- options.dsn = "___PUBLIC_DSN___"
- options.debug = true // Enabled debug when first installing is always helpful
-
- // Adds IP for users.
- // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
- options.sendDefaultPii = true
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
- // We recommend adjusting this value in production.
- options.tracesSampleRate = 1
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
-
- options.configureProfiling = {
- $0.lifecycle = .trace
- $0.sessionSampleRate = 1
- }
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ session-replay
-
- // Record session replays for 100% of errors and 10% of sessions
- options.sessionReplay.onErrorSampleRate = 1.0
- options.sessionReplay.sessionSampleRate = 0.1
- // ___PRODUCT_OPTION_END___ session-replay
- // ___PRODUCT_OPTION_START___ logs
-
- // Enable logs to be sent to Sentry
- options.experimental.enableLogs = true
- // ___PRODUCT_OPTION_END___ logs
- }
-
- return true
-}
-```
-
-```objc {tabTitle:Objective-C}
-@import Sentry;
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-
- [SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
- options.dsn = @"___PUBLIC_DSN___";
- options.debug = YES; // Enabled debug when first installing is always helpful
-
- // Adds IP for users.
- // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
- options.sendDefaultPii = YES;
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
- // We recommend adjusting this value in production.
- options.tracesSampleRate = @1.f;
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
-
- options.configureProfiling = ^(SentryProfileOptions *profiling) {
- profiling.lifecycle = SentryProfileLifecycleTrace;
- profiling.sessionSampleRate = 1.f;
- };
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ session-replay
-
- // Record session replays for 100% of errors and 10% of sessions
- options.sessionReplay.onErrorSampleRate = 1.0;
- options.sessionReplay.sessionSampleRate = 0.1;
- // ___PRODUCT_OPTION_END___ session-replay
- // ___PRODUCT_OPTION_START___ logs
-
- // Enable logs to be sent to Sentry
- options.experimental.enableLogs = YES;
- // ___PRODUCT_OPTION_END___ logs
- }];
-
- return YES;
-}
-```
-
-```swift {tabTitle:SwiftUI with App conformer}
-import Sentry
-
-@main
-struct SwiftUIApp: App {
- init() {
- SentrySDK.start { options in
- options.dsn = "___PUBLIC_DSN___"
- options.debug = true // Enabled debug when first installing is always helpful
-
- // Adds IP for users.
- // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
- options.sendDefaultPii = true
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
- // We recommend adjusting this value in production.
- options.tracesSampleRate = 1
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
-
- options.configureProfiling = {
- $0.lifecycle = .trace
- $0.sessionSampleRate = 1
- }
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ session-replay
- // Record session replays for 100% of errors and 10% of sessions
- options.sessionReplay.onErrorSampleRate = 1.0
- options.sessionReplay.sessionSampleRate = 0.1
- // ___PRODUCT_OPTION_END___ session-replay
-
- // ___PRODUCT_OPTION_START___ logs
- // Enable logs to be sent to Sentry
- options.experimental.enableLogs = true
- // ___PRODUCT_OPTION_END___ logs
- }
- }
-}
-```
-
-
-
-
-```swift {tabTitle:Swift}
-import Sentry
-
-func application(_ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
-
- SentrySDK.start { options in
- options.dsn = "___PUBLIC_DSN___"
- options.debug = true // Enabled debug when first installing is always helpful
-
- // Adds IP for users.
- // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
- options.sendDefaultPii = true
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
- // We recommend adjusting this value in production.
- options.tracesSampleRate = 1
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
-
- options.configureProfiling = {
- $0.lifecycle = .trace
- $0.sessionSampleRate = 1
- }
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
-
- // Enable logs to be sent to Sentry
- options.experimental.enableLogs = true
- // ___PRODUCT_OPTION_END___ logs
- }
-
- return true
-}
-```
-
-```objc {tabTitle:Objective-C}
-@import Sentry;
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-
- [SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
- options.dsn = @"___PUBLIC_DSN___";
- options.debug = YES; // Enabled debug when first installing is always helpful
-
- // Adds IP for users.
- // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
- options.sendDefaultPii = YES;
-
- // ___PRODUCT_OPTION_START___ performance
- // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
- // We recommend adjusting this value in production.
- options.tracesSampleRate = @1.f;
- // ___PRODUCT_OPTION_END___ performance
-
- // ___PRODUCT_OPTION_START___ profiling
- options.configureProfiling = ^(SentryProfileOptions *profiling) {
- profiling.lifecycle = SentryProfileLifecycleTrace;
- profiling.sessionSampleRate = 1.f;
- };
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
-
- // Enable logs to be sent to Sentry
- options.experimental.enableLogs = YES;
- // ___PRODUCT_OPTION_END___ logs
- }];
-
- return YES;
-}
-```
-
-```swift {tabTitle:SwiftUI with App conformer}
-import Sentry
-
-@main
-struct SwiftUIApp: App {
- init() {
- SentrySDK.start { options in
- options.dsn = "___PUBLIC_DSN___"
- options.debug = true // Enabled debug when first installing is always helpful
-
- // Adds IP for users.
- // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
- options.sendDefaultPii = true
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
- // We recommend adjusting this value in production.
- options.tracesSampleRate = 1
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ profiling
-
- options.configureProfiling = {
- $0.lifecycle = .trace
- $0.sessionSampleRate = 1
- }
- // ___PRODUCT_OPTION_END___ profiling
- // ___PRODUCT_OPTION_START___ logs
-
- // Enable logs to be sent to Sentry
- options.experimental.enableLogs = true
- // ___PRODUCT_OPTION_END___ logs
- }
- }
-}
-```
-
-
-
-
-
-
-To capture all errors, initialize the SDK as soon as possible, such as in your `WKExtensionDelegate.applicationDidFinishLaunching` method:
-
-```swift
-import Sentry
-
-func applicationDidFinishLaunching() {
- SentrySDK.start { options in
- options.dsn = "___PUBLIC_DSN___"
- options.debug = true // Enabled debug when first installing is always helpful
-
- // Adds IP for users.
- // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
- options.sendDefaultPii = true
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
- // We recommend adjusting this value in production.
- options.tracesSampleRate = 1
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ logs
-
- // Enable logs to be sent to Sentry
- options.experimental.enableLogs = true
- // ___PRODUCT_OPTION_END___ logs
- }
-}
-```
-
-
-
-
-## Uncaught NSExceptions
-
-On macOS, the Sentry Apple SDK can't capture uncaught exceptions out of the box, therefore we recommend enabling `enableUncaughtNSExceptionReporting` in your `SentryOptions`. Alternatively, you can use the `SentryCrashExceptionApplication` class. Please visit capturing uncaught exceptions for more information.
-
-```swift {tabTitle:Swift}
-import Sentry
-
-SentrySDK.start { options in
- options.dsn = "___PUBLIC_DSN___"
- options.enableUncaughtNSExceptionReporting = true
-}
-```
-```objc {tabTitle:Objective-C}
-@import Sentry;
-
-[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
- options.dsn = @"___PUBLIC_DSN___";
- options.enableUncaughtNSExceptionReporting = YES;
-}];
-```
-
-
-
-## Verify
-
-Verify that your app is sending events to Sentry by adding the following snippet, which includes an intentional error. You should see the error reported in Sentry within a few minutes.
-
-
-
-To verify crashes, ensure you run your application without a debugger attached. Otherwise, the SDK won't capture the crash.
-
-
-
-```swift {tabTitle:Swift}
-import Sentry
-
-do {
- try aMethodThatMightFail()
-} catch {
- SentrySDK.capture(error: error)
-}
-```
-
-```objc {tabTitle:Objective-C}
-@import Sentry;
-
-NSError *error = nil;
-[self aMethodThatMightFail:&error]
-
-if (error) {
- [SentrySDK captureError:error];
-}
-```
-
-
-## Next Steps
-
-- Learn more about Sentry's Apple SDK features
-- Add readable stack traces to errors
-- Add Apple Privacy manifest
+
diff --git a/docs/platforms/apple/guides/macos/index.mdx b/docs/platforms/apple/guides/macos/index.mdx
new file mode 100644
index 00000000000000..a4cb3900571fd1
--- /dev/null
+++ b/docs/platforms/apple/guides/macos/index.mdx
@@ -0,0 +1,6 @@
+---
+title: macOS
+description: Learn how to use Sentry's Apple SDK to automatically report errors and exceptions in your application.
+---
+
+
diff --git a/docs/platforms/apple/guides/tvos/index.mdx b/docs/platforms/apple/guides/tvos/index.mdx
new file mode 100644
index 00000000000000..bbf9358c1f3170
--- /dev/null
+++ b/docs/platforms/apple/guides/tvos/index.mdx
@@ -0,0 +1,6 @@
+---
+title: tvOS
+description: Learn how to use Sentry's Apple SDK to automatically report errors and exceptions in your application.
+---
+
+
diff --git a/docs/platforms/apple/guides/visionos/index.mdx b/docs/platforms/apple/guides/visionos/index.mdx
new file mode 100644
index 00000000000000..66dbfc114e7cf2
--- /dev/null
+++ b/docs/platforms/apple/guides/visionos/index.mdx
@@ -0,0 +1,6 @@
+---
+title: visionOS
+description: Learn how to use Sentry's Apple SDK to automatically report errors and exceptions in your application.
+---
+
+
diff --git a/docs/platforms/apple/guides/watchos/index.mdx b/docs/platforms/apple/guides/watchos/index.mdx
new file mode 100644
index 00000000000000..4b137a6dbab885
--- /dev/null
+++ b/docs/platforms/apple/guides/watchos/index.mdx
@@ -0,0 +1,6 @@
+---
+title: watchOS
+description: Learn how to use Sentry's Apple SDK to automatically report errors and exceptions in your application.
+---
+
+
diff --git a/includes/apple-platform-getting-started.mdx b/includes/apple-platform-getting-started.mdx
new file mode 100644
index 00000000000000..efe61f05418b60
--- /dev/null
+++ b/includes/apple-platform-getting-started.mdx
@@ -0,0 +1,427 @@
+On this page, we get you up and running with Sentry's Apple SDK, which will automatically report errors and exceptions in your application.
+
+
+
+If you don't already have an account and Sentry project established, head over to [sentry.io](https://sentry.io/signup/), then return to this page.
+
+
+
+
+
+
+
+The support for [visionOS](https://developer.apple.com/visionos/) is currently experimental, which means it may have bugs. We recognize the irony.
+
+
+
+
+
+## Features
+
+
+
+In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/).
+
+
+
+
+
+In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/).
+
+
+
+Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
+
+## Install
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Sentry captures data by using an SDK within your application's runtime. These are platform-specific and allow Sentry to have a deep understanding of how your application works.
+
+
+
+We recommend installing the SDK with Swift Package Manager (SPM), but we also support alternate [installation methods](install/). To integrate Sentry into your Xcode project, 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:
+
+```
+https://github.com/getsentry/sentry-cocoa.git
+```
+
+
+
+
+We recommend installing the SDK through our [Sentry Wizard](https://github.com/getsentry/sentry-wizard) by running the following command inside your project directory:
+
+```bash
+brew install getsentry/tools/sentry-wizard && sentry-wizard -i ios
+```
+
+This will patch your project and configure the SDK. You'll only need to patch the project once, then you'll be able to add the patched files to your version control system.
+If you prefer, you can also [set up the SDK manually](/platforms/apple/guides/ios/manual-setup/) or follow the instructions below to adapt the [configuration](#configure).
+
+
+
+- Install the Sentry SDK via Swift Package Manager or Cocoapods
+- 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`)
+- If you're using Fastlane, a lane for uploading debug symbols to Sentry will be added
+
+
+
+
+
+## Configure
+
+
+
+To capture all errors, initialize the SDK as soon as possible, such as in your `AppDelegate` `application:didFinishLaunchingWithOptions` method:
+
+
+
+
+
+```swift {tabTitle:Swift}
+import Sentry
+
+func application(_ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+
+ SentrySDK.start { options in
+ options.dsn = "___PUBLIC_DSN___"
+ options.debug = true // Enabled debug when first installing is always helpful
+
+ // Adds IP for users.
+ // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
+ options.sendDefaultPii = true
+ // ___PRODUCT_OPTION_START___ performance
+
+ // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
+ // We recommend adjusting this value in production.
+ options.tracesSampleRate = 1
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
+
+ options.configureProfiling = {
+ $0.lifecycle = .trace
+ $0.sessionSampleRate = 1
+ }
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ session-replay
+
+ // Record session replays for 100% of errors and 10% of sessions
+ options.sessionReplay.onErrorSampleRate = 1.0
+ options.sessionReplay.sessionSampleRate = 0.1
+ // ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.experimental.enableLogs = true
+ // ___PRODUCT_OPTION_END___ logs
+ }
+
+ return true
+}
+```
+
+```objc {tabTitle:Objective-C}
+@import Sentry;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ [SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
+ options.dsn = @"___PUBLIC_DSN___";
+ options.debug = YES; // Enabled debug when first installing is always helpful
+
+ // Adds IP for users.
+ // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
+ options.sendDefaultPii = YES;
+ // ___PRODUCT_OPTION_START___ performance
+
+ // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
+ // We recommend adjusting this value in production.
+ options.tracesSampleRate = @1.f;
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
+
+ options.configureProfiling = ^(SentryProfileOptions *profiling) {
+ profiling.lifecycle = SentryProfileLifecycleTrace;
+ profiling.sessionSampleRate = 1.f;
+ };
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ session-replay
+
+ // Record session replays for 100% of errors and 10% of sessions
+ options.sessionReplay.onErrorSampleRate = 1.0;
+ options.sessionReplay.sessionSampleRate = 0.1;
+ // ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.experimental.enableLogs = YES;
+ // ___PRODUCT_OPTION_END___ logs
+ }];
+
+ return YES;
+}
+```
+
+```swift {tabTitle:SwiftUI with App conformer}
+import Sentry
+
+@main
+struct SwiftUIApp: App {
+ init() {
+ SentrySDK.start { options in
+ options.dsn = "___PUBLIC_DSN___"
+ options.debug = true // Enabled debug when first installing is always helpful
+
+ // Adds IP for users.
+ // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
+ options.sendDefaultPii = true
+ // ___PRODUCT_OPTION_START___ performance
+
+ // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
+ // We recommend adjusting this value in production.
+ options.tracesSampleRate = 1
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
+
+ options.configureProfiling = {
+ $0.lifecycle = .trace
+ $0.sessionSampleRate = 1
+ }
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ session-replay
+ // Record session replays for 100% of errors and 10% of sessions
+ options.sessionReplay.onErrorSampleRate = 1.0
+ options.sessionReplay.sessionSampleRate = 0.1
+ // ___PRODUCT_OPTION_END___ session-replay
+
+ // ___PRODUCT_OPTION_START___ logs
+ // Enable logs to be sent to Sentry
+ options.experimental.enableLogs = true
+ // ___PRODUCT_OPTION_END___ logs
+ }
+ }
+}
+```
+
+
+
+
+```swift {tabTitle:Swift}
+import Sentry
+
+func application(_ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+
+ SentrySDK.start { options in
+ options.dsn = "___PUBLIC_DSN___"
+ options.debug = true // Enabled debug when first installing is always helpful
+
+ // Adds IP for users.
+ // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
+ options.sendDefaultPii = true
+ // ___PRODUCT_OPTION_START___ performance
+
+ // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
+ // We recommend adjusting this value in production.
+ options.tracesSampleRate = 1
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
+
+ options.configureProfiling = {
+ $0.lifecycle = .trace
+ $0.sessionSampleRate = 1
+ }
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.experimental.enableLogs = true
+ // ___PRODUCT_OPTION_END___ logs
+ }
+
+ return true
+}
+```
+
+```objc {tabTitle:Objective-C}
+@import Sentry;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
+ [SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
+ options.dsn = @"___PUBLIC_DSN___";
+ options.debug = YES; // Enabled debug when first installing is always helpful
+
+ // Adds IP for users.
+ // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
+ options.sendDefaultPii = YES;
+
+ // ___PRODUCT_OPTION_START___ performance
+ // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
+ // We recommend adjusting this value in production.
+ options.tracesSampleRate = @1.f;
+ // ___PRODUCT_OPTION_END___ performance
+
+ // ___PRODUCT_OPTION_START___ profiling
+ options.configureProfiling = ^(SentryProfileOptions *profiling) {
+ profiling.lifecycle = SentryProfileLifecycleTrace;
+ profiling.sessionSampleRate = 1.f;
+ };
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.experimental.enableLogs = YES;
+ // ___PRODUCT_OPTION_END___ logs
+ }];
+
+ return YES;
+}
+```
+
+```swift {tabTitle:SwiftUI with App conformer}
+import Sentry
+
+@main
+struct SwiftUIApp: App {
+ init() {
+ SentrySDK.start { options in
+ options.dsn = "___PUBLIC_DSN___"
+ options.debug = true // Enabled debug when first installing is always helpful
+
+ // Adds IP for users.
+ // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
+ options.sendDefaultPii = true
+ // ___PRODUCT_OPTION_START___ performance
+
+ // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
+ // We recommend adjusting this value in production.
+ options.tracesSampleRate = 1
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
+
+ options.configureProfiling = {
+ $0.lifecycle = .trace
+ $0.sessionSampleRate = 1
+ }
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.experimental.enableLogs = true
+ // ___PRODUCT_OPTION_END___ logs
+ }
+ }
+}
+```
+
+
+
+
+
+
+To capture all errors, initialize the SDK as soon as possible, such as in your `WKExtensionDelegate.applicationDidFinishLaunching` method:
+
+```swift
+import Sentry
+
+func applicationDidFinishLaunching() {
+ SentrySDK.start { options in
+ options.dsn = "___PUBLIC_DSN___"
+ options.debug = true // Enabled debug when first installing is always helpful
+
+ // Adds IP for users.
+ // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
+ options.sendDefaultPii = true
+ // ___PRODUCT_OPTION_START___ performance
+
+ // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
+ // We recommend adjusting this value in production.
+ options.tracesSampleRate = 1
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ logs
+
+ // Enable logs to be sent to Sentry
+ options.experimental.enableLogs = true
+ // ___PRODUCT_OPTION_END___ logs
+ }
+}
+```
+
+
+
+
+## Uncaught NSExceptions
+
+On macOS, the Sentry Apple SDK can't capture uncaught exceptions out of the box, therefore we recommend enabling `enableUncaughtNSExceptionReporting` in your `SentryOptions`. Alternatively, you can use the `SentryCrashExceptionApplication` class. Please visit capturing uncaught exceptions for more information.
+
+```swift {tabTitle:Swift}
+import Sentry
+
+SentrySDK.start { options in
+ options.dsn = "___PUBLIC_DSN___"
+ options.enableUncaughtNSExceptionReporting = true
+}
+```
+```objc {tabTitle:Objective-C}
+@import Sentry;
+
+[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
+ options.dsn = @"___PUBLIC_DSN___";
+ options.enableUncaughtNSExceptionReporting = YES;
+}];
+```
+
+
+
+## Verify
+
+Verify that your app is sending events to Sentry by adding the following snippet, which includes an intentional error. You should see the error reported in Sentry within a few minutes.
+
+
+
+To verify crashes, ensure you run your application without a debugger attached. Otherwise, the SDK won't capture the crash.
+
+
+
+```swift {tabTitle:Swift}
+import Sentry
+
+do {
+ try aMethodThatMightFail()
+} catch {
+ SentrySDK.capture(error: error)
+}
+```
+
+```objc {tabTitle:Objective-C}
+@import Sentry;
+
+NSError *error = nil;
+[self aMethodThatMightFail:&error]
+
+if (error) {
+ [SentrySDK captureError:error];
+}
+```
+
+
+## Next Steps
+
+- Learn more about Sentry's Apple SDK features
+- Add readable stack traces to errors
+- Add Apple Privacy manifest