0

Some of my users hate the badge number and want to get rid of it. I know I can set it to zero, once. But is there any way to make it go away forever?

EDIT: the badge number is coming from game center.

William Jockusch
  • 26,513
  • 49
  • 182
  • 323
  • [[UAPush shared]registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert) ]; Have you set like this? If yes then replace to [[UAPush shared]registerForRemoteNotificationTypes:( UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert) ]; – Arun Jun 27 '13 at 04:15
  • Or in the notification receive method do like that... -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSLog(@"Notification Received : %@",userInfo); UIApplicationState appState=UIApplicationStateActive; [[UAPush shared] handleNotification:userInfo applicationState:appState]; [[UAPush shared] resetBadge]; } – Arun Jun 27 '13 at 04:18

1 Answers1

0

The simple answer is no. Game Center will freely set the app badge to the number of active matches the player has in your game (including matches that the player is not the current one in), every time the data is refreshed. You can, as you say, set the app badge to 0 from within your app, but once your app is closed there's nothing to be done about it.

In my app I update the app badge every time I load the player's matches from Game Center, to correspond to the number of matches that the player is the current player in.

John Sundell
  • 9
  • 1
  • 3
  • So what exactly determines the badge count when using Game Center? It is clearly not the local player being `currentParticipant`. – Johan Mar 06 '20 at 06:19