2

I am implementing an application which is support to apple push notifications.If i get three notifications from apple server then in iphone the notification list is showing three notifications and if i select any one of them am going in to application according to the notification.After if i check in iphone notification list for remaining two notification there were no push notifications to see.The notification list is showing No new notification.

And also my application is universal app. The push notification is working fine in iphone4 and iphone5 with ios6 but not working in ipad1 with ios5.

Please help me.

Thanks in advance.

After select any one(push notification) of them

Ganesh G
  • 1,991
  • 1
  • 24
  • 37

1 Answers1

1

This method is fired on the App Delegate when the user tabs the notification in Notification Center:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions (NSDictionary *)launchOptions {

    // You could use the following methods calls:

        // To remove the notifications in Notification Center:
        [[UIApplication sharedApplication] cancelAllLocalNotifications];

        // To set the badge (0 is no badge at all):
        [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
}

If you want to remove the notifications as well when the user returns 'normally' without using the notification add the method calls to:

- (void)applicationWillEnterForeground:(UIApplication *)application {
}

I don't think it is possible to just cancel one notification, check out this post for more info.


Did you google this iPad problem yet? I searched a bit and found others with the same problem. It turns out notifications are working on but you don't see them appear on the lockscreen. Check out these topics:

Or try and google a bit: https://www.google.nl/search?q=ipad+1+notification+center

Community
  • 1
  • 1
Tieme
  • 62,602
  • 20
  • 102
  • 156
  • Hi Tieme, thanks for your reply. If i wrote [[UIApplication sharedApplication] cancelAllLocalNotifications]; then all the notification will be removed, right? – Ganesh G Nov 01 '12 at 21:54
  • Hi, Yes thats's right. Make sure you place it in the right method and check if it is being called with a NSLog or a breakpoint. – Tieme Nov 01 '12 at 21:57
  • I dont want to cancel all the notifications at a time. It will get cancel based on the user select on notification in the notification list. – Ganesh G Nov 01 '12 at 22:08
  • Tieme, Thank you very much you saved me alot with your valuable information . – Ganesh G Nov 02 '12 at 15:20
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/18985/discussion-between-ganesh-guturi-and-tieme) – Ganesh G Nov 02 '12 at 18:14
  • @Tieme how to cancel all *Push Notifications* from notification center? – Neeraj Joshi Jul 06 '17 at 06:10