I have an App in which i am facing the issue that the badge number only gets updated when i open the notification but i need to update the badge number even when app is not open.
Can anyone help me with that??
I have an App in which i am facing the issue that the badge number only gets updated when i open the notification but i need to update the badge number even when app is not open.
Can anyone help me with that??
您需要为设置的值badge
在你的推送通知有效载荷的关键。 从你的描述,这听起来像它只是你的应用程序,它正在更新徽章数量,而不是通知本身。
见通知有效载荷的本地和推送通知编程指南的细节:
在APS字典的密钥和值
badge
(数字)的数量显示为应用程序图标的徽章。 如果此属性不存在,徽章也不会改变。 要删除标志,设置该属性的值为0。