# watchOS | Sentry for watchOS

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.

## [Features](https://docs.sentry.io/platforms/apple/guides/watchos.md#features)

In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](https://docs.sentry.io/concepts/key-terms/tracing.md).

Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.

## [Install](https://docs.sentry.io/platforms/apple/guides/watchos.md#install)

Error Monitoring\[ ]Logs\[ ]Tracing

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](https://docs.sentry.io/platforms/apple/guides/watchos/install.md). 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:

```bash
https://github.com/getsentry/sentry-cocoa.git
```

## [Configure](https://docs.sentry.io/platforms/apple/guides/watchos.md#configure)

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 = "https://examplePublicKey@o0.ingest.sentry.io/0"
        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
        //  performance

        // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
        // We recommend adjusting this value in production.
        options.tracesSampleRate = 1
        //  performance
        //  logs

        // Enable logs to be sent to Sentry
        options.experimental.enableLogs = true
        //  logs
    }
}
```

## [Verify](https://docs.sentry.io/platforms/apple/guides/watchos.md#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
import Sentry

do {
    try aMethodThatMightFail()
} catch {
    SentrySDK.capture(error: error)
}
```

## [Next Steps](https://docs.sentry.io/platforms/apple/guides/watchos.md#next-steps)

* [Learn more about Sentry's Apple SDK features](https://docs.sentry.io/platforms/apple/guides/watchos/features.md)
* [Add readable stack traces to errors](https://docs.sentry.io/platforms/apple/guides/watchos/dsym.md)
* [Add Apple Privacy manifest](https://docs.sentry.io/platforms/apple/guides/watchos/data-management/apple-privacy-manifest.md)
