|
8 | 8 |
|
9 | 9 | ## Unreleased |
10 | 10 |
|
| 11 | +### Upgrading from 7.x to 8.0 |
| 12 | + |
| 13 | +Version 8 of the Sentry React Native SDK updates the underlying native SDKs (Cocoa v9, CLI v3, Android Gradle Plugin v6) which introduce breaking changes in minimum version requirements and build tooling. |
| 14 | + |
| 15 | +See our [migration docs](https://docs.sentry.io/platforms/react-native/migration/v7-to-v8/) for more information. |
| 16 | + |
| 17 | +### Breaking Changes |
| 18 | + |
| 19 | +#### Minimum Version Requirements |
| 20 | + |
| 21 | +- **iOS/macOS/tvOS**: ([#5356](https://github.com/getsentry/sentry-react-native/pull/5356)) |
| 22 | + - iOS **15.0+** (previously 11.0+) |
| 23 | + - macOS **10.14+** (previously 10.13+) |
| 24 | + - tvOS **15.0+** (previously 11.0+) |
| 25 | + |
| 26 | +- **Android**: ([#5578](https://github.com/getsentry/sentry-react-native/pull/5578)) |
| 27 | + - Sentry Android Gradle Plugin **6.0.0** (previously 5.x) |
| 28 | + - Android Gradle Plugin **7.4.0+** (previously 7.3.0+) |
| 29 | + - Kotlin **1.8+** |
| 30 | + |
| 31 | +- **Sentry Self-Hosted**: ([#5523](https://github.com/getsentry/sentry-react-native/pull/5523)) |
| 32 | + - Sentry CLI v3 requires self-hosted **25.11.1+** (previously 25.2.0) |
| 33 | + |
| 34 | +### Features |
| 35 | + |
| 36 | +- Capture App Start errors and crashes by initializing Sentry from `sentry.options.json` ([#4472](https://github.com/getsentry/sentry-react-native/pull/4472)) |
| 37 | + |
| 38 | + Create `sentry.options.json` in the React Native project root and set options the same as you currently have in `Sentry.init` in JS. |
| 39 | + |
| 40 | + ```json |
| 41 | + { |
| 42 | + "dsn": "https://key@example.io/value", |
| 43 | + } |
| 44 | + ``` |
| 45 | + |
| 46 | + Initialize Sentry on the native layers by newly provided native methods. |
| 47 | + |
| 48 | + ```kotlin |
| 49 | + import io.sentry.react.RNSentrySDK |
| 50 | + |
| 51 | + class MainApplication : Application(), ReactApplication { |
| 52 | + override fun onCreate() { |
| 53 | + super.onCreate() |
| 54 | + RNSentrySDK.init(this) |
| 55 | + } |
| 56 | + } |
| 57 | + ``` |
| 58 | + |
| 59 | + ```obj-c |
| 60 | + #import <RNSentry/RNSentry.h> |
| 61 | + |
| 62 | + @implementation AppDelegate |
| 63 | + - (BOOL)application:(UIApplication *)application |
| 64 | + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
| 65 | + { |
| 66 | + [RNSentrySDK start]; |
| 67 | + return [super application:application didFinishLaunchingWithOptions:launchOptions]; |
| 68 | + } |
| 69 | + @end |
| 70 | + ``` |
| 71 | +
|
| 72 | +- Add RNSentrySDK APIs support to @sentry/react-native/expo plugin ([#4633](https://github.com/getsentry/sentry-react-native/pull/4633)) |
| 73 | + - Adds `useNativeInit` option to automatically initialize Sentry natively before JavaScript loads, enabling capture of app start errors |
| 74 | + ```json |
| 75 | + { |
| 76 | + "expo": { |
| 77 | + "plugins": [ |
| 78 | + [ |
| 79 | + "@sentry/react-native/expo", |
| 80 | + { |
| 81 | + "useNativeInit": true |
| 82 | + } |
| 83 | + ] |
| 84 | + ] |
| 85 | + } |
| 86 | + } |
| 87 | + ``` |
| 88 | + |
| 89 | +### Changes |
| 90 | + |
| 91 | +- Load `optionsFile` into the JS bundle during Metro bundle process ([#4476](https://github.com/getsentry/sentry-react-native/pull/4476)) |
| 92 | +- Add experimental version of `startWithConfigureOptions` for Apple platforms ([#4444](https://github.com/getsentry/sentry-react-native/pull/4444)) |
| 93 | +- Add experimental version of `init` with optional `OptionsConfiguration<SentryAndroidOptions>` for Android ([#4451](https://github.com/getsentry/sentry-react-native/pull/4451)) |
| 94 | +- Add initialization using `sentry.options.json` for Apple platforms ([#4447](https://github.com/getsentry/sentry-react-native/pull/4447)) |
| 95 | +- Add initialization using `sentry.options.json` for Android ([#4451](https://github.com/getsentry/sentry-react-native/pull/4451)) |
| 96 | +- Merge options from file with `Sentry.init` options in JS ([#4510](https://github.com/getsentry/sentry-react-native/pull/4510)) |
| 97 | + |
| 98 | +### Internal |
| 99 | + |
| 100 | +- Extract iOS native initialization to standalone structures ([#4442](https://github.com/getsentry/sentry-react-native/pull/4442)) |
| 101 | +- Extract Android native initialization to standalone structures ([#4445](https://github.com/getsentry/sentry-react-native/pull/4445)) |
| 102 | + |
11 | 103 | ### Dependencies |
12 | 104 |
|
13 | | -- Bump Cocoa SDK from v9.1.0 to v9.3.0 ([#5515](https://github.com/getsentry/sentry-react-native/pull/5515)) |
| 105 | +- Bump Cocoa SDK from v8.58.0 to v9.3.0 ([#5356](https://github.com/getsentry/sentry-react-native/pull/5356), [#5515](https://github.com/getsentry/sentry-react-native/pull/5515)) |
14 | 106 | - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#930) |
15 | 107 | - [diff](https://github.com/getsentry/sentry-cocoa/compare/9.1.0...9.3.0) |
| 108 | +- Bump CLI from v2.58.4 to v3.1.0 ([#5523](https://github.com/getsentry/sentry-react-native/pull/5523), [#5471](https://github.com/getsentry/sentry-react-native/pull/5471), [#5514](https://github.com/getsentry/sentry-react-native/pull/5514), [#5502](https://github.com/getsentry/sentry-react-native/pull/5502)) |
| 109 | + - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#310) |
| 110 | + - [diff](https://github.com/getsentry/sentry-cli/compare/2.58.4...3.1.0) |
16 | 111 |
|
17 | 112 | ## 7.12.0 |
18 | 113 |
|
|
0 commit comments