Reputation: 1687
Currently running "react-native-navigation": "2.0.0-experimental.304"
with "react-native-sentry": "^0.8.1"
In the setup for react-native-navigation it asks the user to modify the AppDelegate.m
to look more like this example which replaces RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation...
with [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];
Since I no longer have a reference to rootView
I cannot pass it to sentry setup method [RNSentry installWithRootView:rootView];
How can I access that original rootView (RCTRootView)
so I can pass it to Sentry?
Thanks for the help
Upvotes: 2
Views: 567
Reputation: 3438
In react-native-navigation v1
you can use the code below instead of [RNSentry installWithRootView:rootView];
:
[RNSentry installWithBridge:[[RCCManager sharedInstance] getBridge]];
But in react-native-navigation v2
the RCCManager
file is removed and for integrating react-native-sentry
you can use this code, in AppDelegate.m
file instead of [RNSentry installWithRootView:rootView];
.
[RNSentry installWithBridge:[ReactNativeNavigation getBridge]];
Upvotes: 3
Reputation: 4532
You should be able to use installWithBridge.
[RNSentry installWithBridge:[[RCCManager sharedInstance] getBridge]];
Upvotes: 2