---
title: "Migrate from 2.x to 3.x"
description: "Learn about migrating from Sentry Capacitor SDK 2.x to 3.x"
url: https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3/
---

# Migrate from 2.x to 3.x | Sentry for Capacitor

Version 3 of the Sentry Capacitor SDK introduces API cleanup, version support changes, and adds Capacitor 8 support.

The main goal of version 3 of Sentry Capacitor SDK is to provide compatibility with Sentry JavaScript version 10. To achieve this, the update includes breaking changes including the removal of deprecated APIs, reorganization of the npm package structure and also the refactoring on how you initialize Sentry Capacitor.

## [Minimum Version Requirements](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#minimum-version-requirements)

iOS, macOS, and tvOS have increased minimum version requirements:

* **iOS**: 15.0+ (previously 11.0+)
* **macOS**: 10.14+ (previously 10.13+)
* **tvOS**: 15.0+ (previously 11.0+)

## [Self-Hosted Sentry Compatibility](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#self-hosted-sentry-compatibility)

If you are using a self-hosted Sentry instance, we recommend using version 24.4.2 or higher for full feature support.

## [Major Changes in Sentry JS SDK v10](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#major-changes-in-sentry-js-sdk-v10)

This update contains API cleanups related to `BaseClient`, `hasTracingEnabled`, and `logger` from `@sentry/core`. Each Sibling SDK has specific changes in version 10, follow the guides below to update the SDK.

* [Angular SDK v9 to v10 migration guide](https://docs.sentry.io/platforms/javascript/guides/angular/migration/v9-to-v10.md).
* [React SDK v9 to v10 migration guide](https://docs.sentry.io/platforms/javascript/guides/react/migration/v9-to-v10.md).
* [Vue SDK v9 to v10 migration guide](https://docs.sentry.io/platforms/javascript/guides/vue/migration/v9-to-v10.md).
* [Nuxt SDK v9 to v10 migration guide](https://docs.sentry.io/platforms/javascript/guides/nuxt/migration/v9-to-v10.md).

## [Important Capacitor SDK `3.x` Changes](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#important-capacitor-sdk-3x-changes)

This section describes the changes in Sentry Capacitor SDK, version 3.

### [Changes on How You Initialize the SDK on Projects Using Vue or Nuxt](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#changes-on-how-you-initialize-the-sdk-on-projects-using-vue-or-nuxt)

Starting in version `3.0.0`, Vue and Nuxt options must be nested inside `siblingOptions` rather than passed directly to `Sentry.init()`.

```JavaScript
import * as Sentry from '@sentry/capacitor';
import * as SentryVue from '@sentry/vue';

Sentry.init({
- app: app,
- attachErrorHandler: false,
- attachProps: true,
- tracingOptions: { ... },
  dsn: '...',
+ siblingOptions: {
+   vueOptions: {
+     app: app,
+     attachErrorHandler: false,
+     attachProps: true,
+     tracingOptions: { ... },
+   },
+ },
}, SentryVue.init);
```

### [Removed APIs](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#removed-apis)

The following APIs have been removed or renamed:

* `BaseClient` → use `Client` instead
* `hasTracingEnabled()` → use `hasSpansEnabled()` instead
* Internal logger exports from `@sentry/core` → use `debug` and `SentryDebugLogger` types

### [Logs Configuration Changes](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#logs-configuration-changes)

Logging options have been moved out of the `_experiments` namespace. Update your configuration as follows:

```javascript
Sentry.init({
  dsn: '...',
- _experiments: {
-   enableLogs: true,
-   beforeSendLog: (log) => log,
- },
+ enableLogs: true,
+ beforeSendLog: (log) => log,
});
```

### [Integration Changes](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/v2-to-v3.md#integration-changes)

This version restores several integrations that were previously missing and adds a new Spotlight integration that works on both Web and Mobile. The following integrations are now available:

|                                                                                                                                              | **Auto Enabled** | **Errors** | **Tracing** | **Replay** | **Additional Context** |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------- | ----------- | ---------- | ---------------------- |
| [`breadcrumbsIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/breadcrumbs.md)           | ✓                |            |             |            | ✓                      |
| [`browserApiErrorsIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/browserapierrors.md) | ✓                | ✓          |             |            |                        |
| [`dedupeIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/dedupe.md)                     | ✓                | ✓          |             |            |                        |
| [`functionToStringIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/functiontostring.md) | ✓                |            |             |            |                        |
| [`globalHandlersIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/globalhandlers.md)     | ✓                | ✓          |             |            |                        |
| [`inboundFiltersIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/inboundfilters.md)     | ✓                | ✓          |             |            |                        |
| [`linkedErrorsIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/linkederrors.md)         | ✓                | ✓          |             |            |                        |
| [`spotlightIntegration`](https://docs.sentry.io/platforms/javascript/guides/capacitor/configuration/integrations/spotlight.md)               |                  |            |             |            |                        |
