Skip to content

Commit 3abc22e

Browse files
ingridwangfacebook-github-bot
authored andcommitted
Suppress deprecated status bar APIs in RCTStatusBarManager
Summary: [iOS][Fixed] Suppressed iOS 13 deprecation warnings in RCTStatusBarManager Differential Revision: D69334478
1 parent 75edf3a commit 3abc22e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/react-native/React/CoreModules/RCTStatusBarManager.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ + (BOOL)requiresMainQueueSetup
8080
- (void)startObserving
8181
{
8282
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
83+
#pragma clang diagnostic push
84+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
8385
[nc addObserver:self
8486
selector:@selector(applicationDidChangeStatusBarFrame:)
8587
name:UIApplicationDidChangeStatusBarFrameNotification
@@ -88,6 +90,7 @@ - (void)startObserving
8890
selector:@selector(applicationWillChangeStatusBarFrame:)
8991
name:UIApplicationWillChangeStatusBarFrameNotification
9092
object:nil];
93+
#pragma clang diagnostic pop
9194
}
9295

9396
- (void)stopObserving
@@ -97,7 +100,10 @@ - (void)stopObserving
97100

98101
- (void)emitEvent:(NSString *)eventName forNotification:(NSNotification *)notification
99102
{
103+
#pragma clang diagnostic push
104+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
100105
CGRect frame = [notification.userInfo[UIApplicationStatusBarFrameUserInfoKey] CGRectValue];
106+
#pragma clang diagnostic pop
101107
NSDictionary *event = @{
102108
@"frame" : @{
103109
@"x" : @(frame.origin.x),

0 commit comments

Comments
 (0)