当接收到更新证件号码推送通知时,应用程序是无法打开 [英] Update Badge Number when push notification is received when App is not Open

查看:114
本文介绍了当接收到更新证件号码推送通知时,应用程序是无法打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序中,我面临的问题是,当我打开通知徽章号仅被更新,但我需要甚至更新的证件号码时,应用程序没有打开。

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.

谁能帮我与??

推荐答案

您需要为设置的值在您的推送通知的有效载荷徽章键。从你的描述,这听起来像它只是你的应用程序,它正在更新证件号码,而不是通知本身。

You need to set a value for the badge key in your push notification payload. From your description, it sounds like it is only your application which is updating the badge number, and not the notification itself.

请参阅The本地和推送通知编程指南详细信息通知载荷

键和APS字典值

徽章(数字):数字显示为应用程序图标的徽章。如果此属性不存在,徽章不会改变。要删除徽章,设置该属性的值设置为0。

badge (number): The number to display as the badge of the application icon. If this property is absent, the badge is not changed. To remove the badge, set the value of this property to 0.

这篇关于当接收到更新证件号码推送通知时,应用程序是无法打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆