Skip to content

Commit 58ff6df

Browse files
(Capacitor): Add migration guide for new version (#10987)
1 parent b2082d3 commit 58ff6df

File tree

7 files changed

+64
-41
lines changed

7 files changed

+64
-41
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Migration Guide
3+
description: "Migrate from an older version of our Sentry Capacitor SDK."
4+
sidebar_order: 8000
5+
---
6+
7+
Here's a list of guides on migrating to a newer version of the Sentry Capacitor SDK.
8+
9+
10+
<PageGrid />
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Migrate from 0.x to 1.x
3+
sidebar_order: 8920
4+
description: "Learn about migrating from Sentry Capacitor SDK 0.x to 1.x"
5+
---
6+
7+
## How to upgrade to SDK version 1:
8+
9+
When upgrading to SDK version 1, please note the main breaking changes with Sentry Capacitor. More detailed information about breaking changes in the sibling SDKs can be found in the <PlatformLink to="/migration/v0-to-v1/v7-to-v8/">sibling migration guide</PlatformLink>.
10+
11+
- Angular minimum supported version changed to version 14, upgrade to Angular 14 or higher for using the latest SDK.
12+
13+
- When using the package `@sentry/angular-ivy`, you will need to replace it by `@sentry/angular`.
14+
15+
- `enableOutOfMemoryTracking` was removed and replaced by `enableWatchdogTerminationTracking`.
16+
17+
- Capacitor V1 requires Sentry JavaScript SDK on version 8.x. We recommend reading below migration guide docs to find out how to address any breaking changes when upgrading the sibling dependencies to version 8.
18+
19+
<PageGrid/>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Migrate from Sibling SDK 7.x to 8.x
3+
sidebar_order: 8910
4+
description: "Learn about migrating from Sentry JavaScript SDK 7.x to 8.x"
5+
---
6+
7+
<Include name="../docs/platforms/javascript/common/migration/v7-to-v8/index" />
8+
9+
<PageGrid />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Deprecations in 7.x
3+
sidebar_order: 8940
4+
description: "Learn about deprecations in Sentry JavaScript SDK 7.x and how to address them"
5+
---
6+
7+
<Include name="../docs/platforms/javascript/common/migration/v7-to-v8/v7-deprecations" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: New Tracing APIs
3+
sidebar_order: 8920
4+
description: "Learn about new Tracing APIs in Sentry JavaScript SDK 8.x"
5+
---
6+
7+
<Include name="../docs/platforms/javascript/common/migration/v7-to-v8/v8-new-performance-api" />

includes/migration/javascript-v8/browser-other-changes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Sentry.init({
3434

3535
The xhr transport via `makeXHRTransport` transport has been removed. Only `makeFetchTransport` is available now. This means that the Sentry SDK requires the `fetch` API to be available in the environment.
3636

37-
<PlatformSection notSupported={['javascript.wasm']}>
37+
<PlatformSection notSupported={['javascript.wasm', 'javascript.capacitor']}>
3838
### Removal of the `Offline` integration
3939

4040
The `Offline` integration has been removed in favor of the <PlatformLink to="/configuration/transports/#makebrowserofflinetransport">offline transport wrapper</PlatformLink>

platform-includes/getting-started-install/javascript.capacitor.mdx

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -44,49 +44,20 @@ yarn add @sentry/capacitor @sentry/browser
4444
pnpm add @sentry/capacitor @sentry/browser
4545
```
4646

47-
### Capacitor 2 - Android Specifics
47+
### Angular Version Compatibility
4848

49-
<Note>
49+
In its current beta version, the Sentry Capacitor SDK only supports Angular 14 and newer.
5050

51-
This step is not needed if you are using Capacitor 3
51+
If you're using an older version of Angular, you also need to use an older version of the SDK. See the table below for compatibility guidance:
5252

53-
</Note>
53+
| Angular version | Recommended Sentry SDK |
54+
| --------------- | ------------------------------------------------------------------------------------------------------ |
55+
| 14 and newer | `@sentry/capacitor` `@sentry/angular` |
56+
| 12 or 13 | `@sentry/capacitor^0` `@sentry/angular-ivy@^7` * |
57+
| 10 or 11 | `@sentry/capacitor^0` `@sentry/angular@^7` * |
5458

55-
Add the plugin declaration to your `MainActivity.java` file
59+
\* These versions of the SDK are no longer maintained or tested. Version 0 might still receive bug fixes but we don't guarantee support.
5660

57-
```java {filename:MainActivity.java}
58-
import android.os.Bundle;
59-
import com.getcapacitor.BridgeActivity;
60-
import com.getcapacitor.Plugin;
61-
import io.sentry.capacitor.SentryCapacitor;
62-
import java.util.ArrayList;
61+
### React and Vue Version Compatibility
6362

64-
public class MainActivity extends BridgeActivity {
65-
@Override
66-
public void onCreate(Bundle savedInstanceState) {
67-
super.onCreate(savedInstanceState);
68-
// Initializes the Bridge
69-
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
70-
add(SentryCapacitor.class);
71-
}});
72-
}
73-
}
74-
```
75-
76-
```kotlin
77-
import android.os.Bundle
78-
import com.getcapacitor.BridgeActivity
79-
import com.getcapacitor.Plugin
80-
import io.sentry.capacitor.SentryCapacitor
81-
82-
class MainActivity : BridgeActivity() {
83-
fun onCreate(savedInstanceState: Bundle?) {
84-
super.onCreate(savedInstanceState)
85-
// Initializes the Bridge
86-
this.init(
87-
savedInstanceState,
88-
listOf<Class<out Plugin>>(SentryCapacitor::class.java)
89-
)
90-
}
91-
}
92-
```
63+
Both Frameworks are fully compatible with the current and beta versions of Sentry Capacitor.

0 commit comments

Comments
 (0)