0

I am developing an iOS app that aims to receive push notifications as does whatsapp. But I do not know how to make the app when closed (idle, I do not mean in background), this update the badge counter. I can only send payload from a static number, but I can not update the total number of notifications.

I searched a lot but I've only found a way to upgrade from background or foreground but never when fully closed. However whatsapp can.

Thank you very much for your attention and apologies for my English.

  • I would recommend posting what you have tried. Your question at this point is very ambiguous in the sense it is asking about methodology and not a technical issue. – Dan Feb 23 '15 at 15:52
  • Sorry for the inconvenience. – Carlos Alcaide Feb 23 '15 at 16:39
  • Already had similar questions, look for https://stackoverflow.com/questions/28551108/dismissing-ios-push-notifications-remotely?noredirect=1&lq=1 https://stackoverflow.com/questions/14872088/get-push-notification-while-app-in-foreground-ios?rq=1 https://stackoverflow.com/questions/26679642/update-badge-icon?rq=1 https://stackoverflow.com/questions/34693473/is-it-possible-to-update-badge-number-on-app-icon-without-openining-app-on-push?rq=1 – Artyom Vlasenko Feb 02 '18 at 18:04

1 Answers1

0

Can be with silent push notification, in the application:didReceiveRemoteNotification:fetchCompletionHandler: you can remote your notification with the [application setApplicationIconBadgeNumber:badgeNumber - 1]; May be This would help you.

Community
  • 1
  • 1
Mohd Prophet
  • 1,511
  • 10
  • 17
  • Thanks for your answers. At the end I solved making a fresh registration notifications via database. When sending a notification think an entry in the table and when the user opens the notification background I send a request to delete the entry. By controlling notifications via database, I can send the payload with the updated badge. Excuse my English, for me it is a problem writing in this language. – Carlos Alcaide Feb 23 '15 at 16:38