0

I want to Increase batch count when app is in Background state or Terminated state, in my case batch is coming on App Icon but it is not increasing dynamically when second, third notification comes. from server side they are not sending me batch count in payload. I want to handle it from my side. I used UserDefault to save Count but its not working.

please some buddy help me.

Kumar Lav
  • 5
  • 1
  • 5
  • You cannot handle the badge count from the app side. It need to be send in the payload. – Anuraj Sep 04 '18 at 07:12
  • oh okk thanks, but when batch comes in Paylod than how i show in app icon batch. – Kumar Lav Sep 04 '18 at 07:23
  • you dont need to handle it in app, when your push notification payload comes the iOS will automatically show badge count on your app icon – junaid Sep 04 '18 at 07:31
  • { “aps” : { “badge” : 9 “sound” : “bingbong.aiff” }, “messageID” : “ABCDEFGHIJ” } – junaid Sep 04 '18 at 07:32

1 Answers1

0

Check those answers:

  1. Updating iOS badge without push notifications It is how you can set a badge in the app

  2. iOS Background Task/Push Notification It is what you need to do if you want to do it in background on receiving push notification

lobstah
  • 871
  • 7
  • 12