-
-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathRNSentryRNSScreen.m
More file actions
34 lines (27 loc) · 923 Bytes
/
RNSentryRNSScreen.m
File metadata and controls
34 lines (27 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#import "RNSentryRNSScreen.h"
#if SENTRY_HAS_UIKIT
# import "RNSentryDependencyContainer.h"
# import "RNSentryFramesTrackerListener.h"
# if __has_include(<Sentry/SentrySwizzle.h>)
# import <Sentry/SentrySwizzle.h>
# else
# import "SentrySwizzle.h"
# endif
@import Sentry;
@implementation RNSentryRNSScreen
+ (void)swizzleViewDidAppear
{
Class rnsscreenclass = NSClassFromString(@"RNSScreen");
if (rnsscreenclass == nil) {
return;
}
SEL selector = NSSelectorFromString(@"viewDidAppear:");
SentrySwizzleInstanceMethod(rnsscreenclass, selector, SentrySWReturnType(void),
SentrySWArguments(BOOL animated), SentrySWReplacement({
[[[RNSentryDependencyContainer sharedInstance] framesTrackerListener] startListening];
SentrySWCallOriginal(animated);
}),
SentrySwizzleModeOncePerClass, (void *)selector);
}
@end
#endif