Remove single remote notification from Notification Center

ios, ipad, push-notification

Solution

There is no way to remove a specific notification as of iOS SDK 5.0. The way to remove all the notifications from your app so they don't show in the Notification Center when the user opens the app from one of them, is to set the app badge to 0, like this:

[UIApplication sharedApplication].applicationIconBadgeNumber = 0;

EDIT: on iOS 8, SpringBoard seems to be automatically dismissing a notification when you tap on it on the Notification Center to open the app.

Problem

my app receives remote notification from Apple server. Is there a way to remove a single remote notification from notification center (the drop-down menu available from iOs 5.0+), when the user taps on it? Thanks!

Original source