diff --git a/ios/RNSentry.h b/ios/RNSentry.h index d655d7d422..ee9eff310d 100644 --- a/ios/RNSentry.h +++ b/ios/RNSentry.h @@ -17,5 +17,6 @@ @interface RNSentry : NSObject + (void)installWithRootView:(RCTRootView *)rootView; ++ (void)installWithBridge:(RCTBridge *)bridge; @end diff --git a/ios/RNSentry.m b/ios/RNSentry.m index ee6c5b4422..785548f195 100644 --- a/ios/RNSentry.m +++ b/ios/RNSentry.m @@ -16,9 +16,13 @@ - (dispatch_queue_t)methodQueue return dispatch_get_main_queue(); } ++ (void)installWithBridge:(RCTBridge *)bridge { + RNSentry *sentry = [bridge moduleForName:@"RNSentry"]; + [[bridge moduleForName:@"ExceptionsManager"] initWithDelegate:sentry]; +} + + (void)installWithRootView:(RCTRootView *)rootView { - RNSentry *sentry = [rootView.bridge moduleForName:@"RNSentry"]; - [[rootView.bridge moduleForName:@"ExceptionsManager"] initWithDelegate:sentry]; + [RNSentry installWithBridge: rootView.bridge]; } + (NSNumberFormatter *)numberFormatter {