Tobias Brysiewicz
Tobias Brysiewicz

Reputation: 11

Swift View Push Notifications In App

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

Answers (2)

Mathew Spolin
Mathew Spolin

Reputation: 371

It's a snap to change the badge count from anywhere in the app:

        UIApplication.sharedApplication().applicationIconBadgeNumber = 4

Upvotes: 1

dimpiax
dimpiax

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

Related Questions