iOS “thread-id” doesn't group push notifications

前端 未结 4 730
野的像风
野的像风 2020-12-16 18:17

From the documentation:

thread-id | string | When displaying notifications, the system visually groups notifications with th

相关标签:
4条回答
  • 2020-12-16 18:42

    I had this problem with Firebase not using apns-collapse-id. How I solved it was to use key instead of certificates. You can find the key right under the certificates in developer.apple.com . It now uses one "row" of notification and puts the last notification from group into that row. Advanced features such as replacing content would have the necessity to use notification ui extension.

    0 讨论(0)
  • 2020-12-16 18:50

    You don’t need:

    • apns-collapse-id
    • NotificationContentExtension

    Never in the docs it's mentioned that way that you need them. It's just that they are related.

    Solution:

    For me it worked out of the box. It's just the iOS doesn't immediately render notifications into groups.

    1. Send Notifications with thread-ids
    2. Then Wait. Let your iPhone/iPad lock screen turn off. (Mine was locked).
    3. Then send another message
    4. If that doesn't work then just be patient a bit and try again.

    Then all of the sudden it starts to group and work as expected!!!

    0 讨论(0)
  • 2020-12-16 18:52

    https://medium.com/the-guardian-mobile-innovation-lab/how-to-replace-the-content-of-an-ios-notification-2d8d93766446:

    says to use apns-collapse-id instead

    0 讨论(0)
  • 2020-12-16 18:55

    Unfortunately, you don't get this for free. You need to create a Notifictation UI extension, and implement your own UI(in this case it's a conversation UI), and update the UI when receive new notification with same thread-id.

    Edit: this may not be the correct answer, see a more comprehensive answer here.

    0 讨论(0)
提交回复
热议问题