Bushes
Bushes

Reputation: 1010

Notifications ios, 1 always next to icon

I've recently implemented local notifications but for some reason, I always have a 1 next to the icon of the app regardless of if a notification has triggered or not. Why is this?

Upvotes: 1

Views: 370

Answers (1)

WrightsCS
WrightsCS

Reputation: 50707

You can set your Applications badge number to 0 which will remove the badge. You can do this each time your application starts up. This will ensure that the badge is cleared when the user launches your app.

As for the 1 always appearing on your application regardless of notifications, somewhere in your app you have set the badge number to 1. Go through your code thoroughly to check for any indications that you have set the badge number.

Remove Badge

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0];
}

Upvotes: 2

Related Questions