当前使用"react-native-navigation": "2.0.0-experimental.304"运行"react-native-sentry": "^0.8.1"
在反应本机导航的设置中,它要求用户修改AppDelegate.m,使其看起来更像用[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];替换RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation...的这个示例。
由于我不再有对rootView的引用,所以不能将它传递给哨兵设置方法[RNSentry installWithRootView:rootView];
如何访问原始的rootView (RCTRootView)以便将其传递给Sentry?
谢谢你的帮助
发布于 2018-03-02 02:22:53
您应该能够使用installWithBridge。
[RNSentry installWithBridge:[[RCCManager sharedInstance] getBridge]];发布于 2018-08-26 07:31:20
在react-native-navigation v1中,您可以使用下面的代码而不是[RNSentry installWithRootView:rootView];
[RNSentry installWithBridge:[[RCCManager sharedInstance] getBridge]];但是在react-native-navigation v2中,RCCManager文件被删除,为了集成react-native-sentry,您可以在AppDelegate.m文件中而不是在[RNSentry installWithRootView:rootView];中使用该代码。
[RNSentry installWithBridge:[ReactNativeNavigation getBridge]];https://stackoverflow.com/questions/43932332
复制相似问题