1

In IOS app, is there any options to clear a single notification or marked it as read after tapping on it? My belief is that Apple does not provide this feature. They only provide to clear all the notifications at a time. I searched a lot but didn't find any solution. Though I have found clearing one notification at a time in some apps (ex. Gmail).

Thanks in advance!

braX
  • 11,506
  • 5
  • 20
  • 33
Kirity
  • 283
  • 1
  • 4
  • 8

2 Answers2

1

You can set the number in this property

 [UIApplication sharedApplication].applicationIconBadgeNumber

For example to decrease it by one

[UIApplication sharedApplication].applicationIconBadgeNumber -= 1;

To set it to a specific value

[UIApplication sharedApplication].applicationIconBadgeNumber = 5;
Omar Abdelhafith
  • 21,163
  • 5
  • 52
  • 56
1

I don't know how this would work with push notifications, but you can cancel individual local notifications like this:

[[UIApplication sharedApplication] cancelLocalNotification:notification];

You can get a reference to the notification that was tapped by the App Delegate application:DidReceiveLocalNotification method.

Scott Berrevoets
  • 16,921
  • 6
  • 59
  • 80