You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reading the source code, it seems that when you call the install method from js side, Sentry sets up a client to the native side. This makes sense for most React Native apps that makes setting up Sentry very easy.
My condition however is different since our app is a hybrid one. The js setup code won't be called unless you open up a view controller containing react codes, so we have to do setup in [AppDelegate application:didFinishLaunchingWithOptions:]. We also still need to do setup from js side to make sure React Native's crash tracking work properly.
The problem with this approach is once you do the setup from js side, the native setup(tags, users) will be removed and we need to do the same setup from js side. Is there any workaround in this? I can only think of modifying the code below to not recreate client when it already exists.
@esam091 A PR cannot harm since I am curious what the actual solution look like, thanks.
But just upfront, it could be that we don't merge it, since, like I said before, we will probably rewrite the SDK so this is possible.
OS:
Platform:
After reading the source code, it seems that when you call the
install
method from js side, Sentry sets up a client to the native side. This makes sense for most React Native apps that makes setting up Sentry very easy.My condition however is different since our app is a hybrid one. The js setup code won't be called unless you open up a view controller containing react codes, so we have to do setup in
[AppDelegate application:didFinishLaunchingWithOptions:]
. We also still need to do setup from js side to make sure React Native's crash tracking work properly.The problem with this approach is once you do the setup from js side, the native setup(tags, users) will be removed and we need to do the same setup from js side. Is there any workaround in this? I can only think of modifying the code below to not recreate client when it already exists.
https://github.com/getsentry/react-native-sentry/blob/8b08b9c6e603ab1b9fd9eae9a50ae0ba5add95a6/ios/RNSentry.m#L134
The text was updated successfully, but these errors were encountered: