Skip to content

Native Initialization in a react native project using expo #4857

Duplicate of#3608
@jakubjanuchta

Description

@jakubjanuchta

Description

Hello,

Is there a way to enable Native Initialization (so that Sentry will send events for native crashes on app load) using Expo on iOS?

https://docs.sentry.io/platforms/react-native/manual-setup/native-init/

I see that it's possible to do that by modifying the AppDelegate file to initialize the SDK as soon as possible but I'm not able to do that using expo.
https://docs.sentry.io/platforms/apple/guides/ios/#configure

Thank you in advance

Activity

moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 23, 2025
changed the title [-]Native Initialization in Expo Managed Workflow[/-] [+]Native Initialization in a react native project using epxo[/+] on May 23, 2025
changed the title [-]Native Initialization in a react native project using epxo[/-] [+]Native Initialization in a react native project using expo[/+] on May 23, 2025
moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 26, 2025
moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 26, 2025
krystofwoldrich

krystofwoldrich commented on May 27, 2025

@krystofwoldrich
Contributor

Hello @jakubjanuchta,
thank you for the message, you are correct, when using Continues Native Generation, you can't directly modify the native code to add the manual native Sentry.init().

However you can use Expo Plugin and Mods to add the native code init, but note that this is an advance technique and we currently provide no docs for this.

We are aware of the need to initialize the SDK as early as possible and are working on a new manual initialization for RN on native. Enabling the native init before JS will be possible using Sentry Expo Plugin -> #4633

For latest updates please follow #3608

jakubjanuchta

jakubjanuchta commented on May 27, 2025

@jakubjanuchta
Author

Thank you for your response @krystofwoldrich 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @krystofwoldrich@jakubjanuchta@JoshuaMoelans

      Issue actions

        Native Initialization in a react native project using expo · Issue #4857 · getsentry/sentry-react-native