Communication Notifications not grouping notifications by conversation

I've implemented Communication Notifications in my messaging application but am having difficulty with figuring out why notifications aren't being grouped by conversation - instead, they all collapse into a single group. I've verified that the conversationIdentifier of the INSendMessageIntent is being correctly set for my notifications, along with the speakableGroupName. Is there anything else I could be missing to achieve the desired conversation grouping behaviour?

Answered by Engineer in 792512022

It is not clear to me if you are using "group" as in the intended group to receive the message or what it sounds like, whether you wanted to "group" your notifications visually.

If the latter, re you trying to group within your app or in the Notification Center?

While you can use conversationIdentifier in your app's UI to manage the grouping, if you want to have the system's Notification Center to show the notifications as grouped, then you need to use the thread-id key in the aps dictionary to signal that you want them visually grouped in the Notification Center. https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification

Keep in mind that whether they will be grouped or not, and the general behavior is up to the system, and is user controllable by the Notification Grouping setting for your app in Settings.

Accepted Answer

It is not clear to me if you are using "group" as in the intended group to receive the message or what it sounds like, whether you wanted to "group" your notifications visually.

If the latter, re you trying to group within your app or in the Notification Center?

While you can use conversationIdentifier in your app's UI to manage the grouping, if you want to have the system's Notification Center to show the notifications as grouped, then you need to use the thread-id key in the aps dictionary to signal that you want them visually grouped in the Notification Center. https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification

Keep in mind that whether they will be grouped or not, and the general behavior is up to the system, and is user controllable by the Notification Grouping setting for your app in Settings.

Thanks for the response. By "group" I mean grouping messages by a conversation identifier in the Notification Center, similar to the grouping behaviour in Messages.app. Looks like I missed setting the thread-id key, that did the trick!

Communication Notifications not grouping notifications by conversation
 
 
Q