react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
745 stars 285 forks source link

Increase the IOS app badge number automatically by 1. #391

Open mohammad-goldast opened 1 year ago

mohammad-goldast commented 1 year ago

Hello there.

I have an issue with calculating the count of unread local and remote notifications.

I can not handle the unread notification badge number and calculate the next number. Some of the users' notifications are sent by our marketing panel (remote) and also users have their local notifications. And I need to handle both of these types and calculate the next number of the app icon badge.

I know this library provides setApplicationIconBadgeNumber but it doesn't help me with this issue. When some notifications send from our marketing panel, the app isn't open and I can not calculate the next badge number manually (by getting the previous badge number and increasing it by 1).

I need an automatic way to increase the badge number without any calculation. and it should work for local and remote notifications.

Is there any solution? Can someone help me with this issue?

Mukthayar1 commented 1 year ago

@mohammad-goldast did you find any soloution