我正在使用UNUserNotification将重复的本地通知推送给用户。我正在尝试在应用上设置徽章编号以指示错过的通知。 我搜索了这个论坛并找到了 iPhone: Incrementing the application badge through a local notification
这表示不可能重复发生本地通知。该帖子已有几年历史了,他们正在使用UILocal通知。
对于UNUserNotification仍然如此吗?有没有办法设置徽章数?
答案 0 :(得分:0)
设置badge
对象的UNMutableNotificationContent
属性。
let notificationContent = UNMutableNotificationContent()
notificationContent.badge = 3
来自http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html#RESTObjectPUT-responses-examples:
<强>徽章强>
要显示为应用的图标徽章的数字。