iOS Swift 3 Bundle Notification

2020-04-17 06:48发布

In My App I am using firebase push notification. Problem is when user connected to internet after long time they will receive lot of notifications as individual notification. Is it Possible to Receive Notification like whatsapp(You have 10 New Notification). If user receives more than 1 notification at a time means we need to make it as Group or Bundle notification.

1条回答
Fickle 薄情
2楼-- · 2020-04-17 07:41

In order to bundle notifications in iOS, you'll have to specify a thread-id:

Provide this key with a string value that represents the app-specific identifier for grouping notifications. The system groups notifications with the same thread identifier together in Notification Center and other system interfaces. For local notifications, this key corresponds to the threadIdentifier property of the UNNotificationContent object.

However, there is currently no parameter counterpart for thread-id in FCM. What you could try and do is make use of a data message payload and specify the thread-id as a custom key-value pair.

Some possibly helpful posts:

查看更多
登录 后发表回答