---
title: "Native Initialization"
description: "Learn how to manually initialize the native SDKs."
url: https://docs.sentry.io/platforms/react-native/manual-setup/native-init/
---

# Native Initialization | Sentry for React Native

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. You can initialize the native SDKs yourself to overcome this limitation or if you want to provide custom options above what the React Native SDK currently provides.

##### Capture App Start Errors

If you're using Sentry React Native SDK version 8.0.0 or higher, see the [Capture App Start Errors](https://docs.sentry.io/platforms/react-native/manual-setup/app-start-error-capture.md) guide for a simpler approach using `sentry.options.json` and native initialization APIs.

To do this, set [autoInitializeNativeSdk](https://docs.sentry.io/platforms/react-native/configuration/options.md#autoInitializeNativeSdk) to `false` in the init options:

```javascript
Sentry.init({
  dsn: "___PUBLIC_DSN___",
  autoInitializeNativeSdk: false,
});
```

This will prevent the React Native SDK from initializing the native SDK automatically.

##### Disabling the Native Layer Entirely

Do not use `autoInitializeNativeSdk` to disable the native layer, instead use [enableNative](https://docs.sentry.io/platforms/react-native/configuration/options.md#enableNative)

Next, initialize the native SDKs for Android, which is documented below, or for iOS by following the [configuration guide to initialize the Sentry Cocoa SDK](https://docs.sentry.io/platforms/apple/guides/ios.md#configure). Note that you do not need to install the native SDKs as they are already packaged with the React Native SDK.

## [iOS Configuration](https://docs.sentry.io/platforms/react-native/manual-setup/native-init.md#ios-configuration)

To enable App Start Instrumentation and Slow and Frozen Frames on iOS when initializing the Sentry Cocoa SDK manually, you have to [configure the sample rate](https://docs.sentry.io/platforms/apple/tracing.md#configure-the-sample-rate/).

## [Android Configuration](https://docs.sentry.io/platforms/react-native/manual-setup/native-init.md#android-configuration)

Initializing with this method uses a Content Provider. Because the JavaScript engine for React Native is also initialized using a Content Provider, we cannot guarantee that Sentry will always initialize before the JavaScript engine.

To use auto-init, add the following to your `AndroidManifest.xml`:

```xml
<meta-data
  android:name="io.sentry.auto-init"
  tools:replace="android:value"
  android:value="true"
/>
```

Then follow [the guide on initializing Android](https://docs.sentry.io/platforms/android.md#configure).

If you want to manually initialize the Android SDK without using the content provider, you can then [follow the manual initialization guide](https://docs.sentry.io/platforms/android/manual-setup.md#configuration-via-sentryoptions) without needing to add the tag since `io.sentry.auto-init` is set to `false` by the React Native SDK.
