Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide notification badge on iOS app reinstall #39410

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions ios/NewExpensify/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ - (BOOL)application:(UIApplication *)application
// You can add your custom initial props in the dictionary below.
// They will be passed down to the ViewController used by React Native.
self.initialProps = @{};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

// Configure firebase
[FIRApp configure];

Expand All @@ -34,7 +34,7 @@ - (BOOL)application:(UIApplication *)application

[RCTBootSplash initWithStoryboard:@"BootSplash"
rootView:(RCTRootView *)self.window.rootViewController.view]; // <- initialization using the storyboard file name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

// Define UNUserNotificationCenter
UNUserNotificationCenter *center =
[UNUserNotificationCenter currentNotificationCenter];
Expand All @@ -44,7 +44,12 @@ - (BOOL)application:(UIApplication *)application
// stopped by a native module in the JS so we can measure total time starting
// in the native layer and ending in the JS layer.
[RCTStartupTimer start];


if (![[NSUserDefaults standardUserDefaults] boolForKey:@"isFirstRunComplete"]) {
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"isFirstRunComplete"];
}

return YES;
}

Expand Down
Loading