更新时间:2023-12-03 18:20:10
如此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.