Reputation: 11
I've got push notifications going to the application I'm working on, but I can't seem to manage them in the application. If I can't manage the notifications in the application, how else can I reduce the incrementing value of the badge icon for the application app-icon?
Upvotes: 1
Views: 331
Reputation: 371
It's a snap to change the badge count from anywhere in the app:
UIApplication.sharedApplication().applicationIconBadgeNumber = 4
Upvotes: 1
Reputation: 12697
You can change badge count in push data, also if you need manage received push notification data, use this function:
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void)
Upvotes: 1