I have come up with a weird problem…. which goes as follows:
- The app receives a Push Notification.
- You tap over the PN (in the iOS notification center).
- The app gets launched… and you handle the notification
- Problem: the notification remains in the ‘notification bar’.
How do you clean it ?. Well… this isn’t in Apple’s docs. But i’ve figured out that if you execute the following line of code, the notification ‘gets acknowledged’:
[cc lang=”objc”]
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
[/cc]
Nice, ha?.