How to auto increment iOS notification badge with Firebase Cloud Messaging?
P

1

17

How can I auto increment the iOS notification badge with Firebase Cloud Messaging? Is it possible to do something like +1 or ++?

Plumbago answered 12/2, 2017 at 22:20 Comment(4)
firebase.google.com/docs/cloud-messaging/… for the documentation scroll down to Table 2a. iOS — keys for notification messages : badge Optional, string Indicates the badge on the client app home icon.Angwantibo
Note: this question shouldn't be marked as a duplicate. Firebase Cloud Messaging has a different API on top of APN so the answers to those other questions are not helpful and do not apply.Chuppah
I just voted it for reopen as this is not a duplicate as Firebase Cloud Messaging has a different API.Chloral
This question should be reopened as the answers provided are not for the FCMPalliate
T
6

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.

Tricostate answered 22/2, 2019 at 16:4 Comment(1)
How does this solution solve this problem #70683161Sagittate

© 2022 - 2024 — McMap. All rights reserved.