How can I auto increment the iOS notification badge with Firebase Cloud Messaging? Is it possible to do something like +1
or ++
?
For Apple client apps, you can receive notification and data payloads up to 4000 bytes over the Firebase Cloud Messaging APNs interface.
Firebase Cloud Messaging (FCM) provides a reliable and battery-efficient connection between your server and devices that allows you to deliver and receive messages and notifications on iOS, Android, and the web at no cost.
'FCM does not work on the iOS simulator, you must test them using a real device. This is a restriction enforced by Apple.
You can set badge value in (notification payload). You can use your own server to send push notifications and control (increment) a badge value. There is no way to control badge number if you are sending a push notification directly from device to device with Firebase. The only way you can set a badge is when you are sure the destination device will receive only push notifications from one source device, and you can set a badge value on that source device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With