diff --git a/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx b/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx index 399eaa01c64e3c..832af84288bd88 100644 --- a/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx +++ b/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx @@ -4,12 +4,6 @@ sidebar_order: 50 description: "Learn how to capture app start errors and crashes that occur before JavaScript loads using native initialization." --- - - -Sentry React Native SDK v8 is currently in beta testing. This feature is available for early adopters and may undergo changes before the stable release. - - - By default, the React Native SDK initializes the native SDK underneath the `init` method called on the JS layer. As a result, the SDK has a current limitation of not capturing native crashes that occur prior to the `init` method being called on the JS layer. Starting with SDK version 8.0.0, you can initialize Sentry natively before JavaScript loads, enabling capture of app start errors and crashes that occur during: @@ -50,7 +44,7 @@ Options from `sentry.options.json` are merged with options from `Sentry.init()` Initialize Sentry in your `MainApplication` class: -```kotlin {filename:android/app/src/main/java/.../MainApplication.kt} +```kotlin {tabTitle:Kotlin,filename:android/app/src/main/java/.../MainApplication.kt} import io.sentry.react.RNSentrySDK class MainApplication : Application(), ReactApplication { @@ -62,11 +56,24 @@ class MainApplication : Application(), ReactApplication { } ``` +```java {tabTitle:Java,filename:android/app/src/main/java/.../MainApplication.java} +import io.sentry.react.RNSentrySDK; + +public class MainApplication extends Application implements ReactApplication { + @Override + public void onCreate() { + super.onCreate(); + RNSentrySDK.init(this); + // ... rest of your initialization code + } +} +``` + ## iOS Setup -Initialize Sentry in your `AppDelegate`: +Initialize Sentry in your `AppDelegate` before starting React Native so app start crashes are captured. -```objective-c {filename:ios/YourApp/AppDelegate.mm} +```objective-c {tabTitle:Objective-C,filename:ios/YourApp/AppDelegate.mm} #import @implementation AppDelegate @@ -81,6 +88,23 @@ Initialize Sentry in your `AppDelegate`: @end ``` +```swift {tabTitle:Swift,filename:ios/YourApp/AppDelegate.swift} +import RNSentry + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil + ) -> Bool { + RNSentrySDK.start() + // ... rest of your initialization code + return true + } +} +``` + ## Expo Setup If you're using Expo, you can enable native initialization automatically using the Expo plugin: diff --git a/docs/platforms/react-native/migration/v7-to-v8.mdx b/docs/platforms/react-native/migration/v7-to-v8.mdx index c176950c2f4ee3..9edcc73e62e189 100644 --- a/docs/platforms/react-native/migration/v7-to-v8.mdx +++ b/docs/platforms/react-native/migration/v7-to-v8.mdx @@ -4,12 +4,6 @@ sidebar_order: 98 description: "Learn how to migrate from version 7 to version 8 of the Sentry React Native SDK" --- - - -**Version 8 is currently in beta.** This migration guide is provided for early adopters. The API and features may change before the stable release. - - - 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. ## Important Changes in Dependencies @@ -33,8 +27,15 @@ The minimum supported versions have been updated: - **iOS**: **15.0+** (previously 11.0+) - **macOS**: **10.14+** (previously 10.13+) - **tvOS**: **15.0+** (previously 11.0+) +- **Xcode**: **16.4+** (required) + +If your app targets older versions, you'll need to update your deployment targets before upgrading to version 8. + +**Note:** Xcode 16.4+ is required for proper Swift module compilation. Using older versions may result in build errors. Ensure your CI/CD environment uses Xcode 16.4 or later. + +If you have custom `post_install` hooks in your `Podfile` that modify `SWIFT_VERSION` or other Swift compiler flags for all pods, exclude Sentry targets to avoid conflicts. -If your app targets older versions, you'll need to update your deployment targets before upgrading to version 8. For more details on the Cocoa SDK v9 changes, see the [Cocoa SDK 8.x to 9.x migration guide](/platforms/apple/migration/#migrating-from-8x-to-9x). +For more details on the Cocoa SDK v9 changes, see the [Cocoa SDK 8.x to 9.x migration guide](/platforms/apple/migration/#migrating-from-8x-to-9x). #### Android