Start a new topic
Answered

iOS how do I get accurate badge count when sending push via Business Logic

I am just trying to make sense of the badge count being sent to iOS with Business Logic. I can set the number but it will not be accurate as I am not sure how to track unread notifications. 


Best Answer
Lodijones,

You might want to store a “read” flag in your collection that stores notifications, also send the notification id and any other metadata in iOSExtras when calling sendPayload from BL and then when the user reads a notification set this read flag to true. Whenever you are calculating the badge count - only count the notifications which are not read for the user.

Thanks,
Pranav
Kinvey Support

 

1 Comment

Answer
Lodijones,

You might want to store a “read” flag in your collection that stores notifications, also send the notification id and any other metadata in iOSExtras when calling sendPayload from BL and then when the user reads a notification set this read flag to true. Whenever you are calculating the badge count - only count the notifications which are not read for the user.

Thanks,
Pranav
Kinvey Support

 

Login or Signup to post a comment