更新时间:2023-12-03 18:41:46
如这个 SO 答案中所述,我们必须发送另一个推送通知以清除之前发送的通知.
As mentioned in this SO answer we have to send another push notification to clear previously sent notifications.
该通知应包含 badge:0
,并省略 alert
和 sound
字段,然后它也会从通知中心删除通知作为清晰的应用标志.
That notification should contain badge:0
, and omit the alert
and sound
fields, then it will remove notifications from notification centre as well as clear app badge.