Firstly, on iOS 16 we have noticed that on tapping a push notification in the Notification Center that other push notifications with the same title
and body
(in UNMutableNotificationContent
) get also removed.
We want to display push notifications that show the same text to the user and with a similar or different image (UNNotificationAttachment). There are other other unique values in for several keys in the payload
in the userInfo
of the UNMutableNotificationContent
.
Secondly, when using removeDeliveredNotifications
with a specific identifier, all notifications with the same title
and body
will also be removed from the Notification Center.
To fix solve these two issues (to prevent that other notifications with the same title
and body
get removed) I would now have to add a random text to the body. This is not something we want to show to the user. I tried setting a unique categoryIdentifier
and/or threadIdentifier
, but still push notifications with the same title
and body
in the UNMutableNotificationContent
get removed simultaneously.
Before iOS 16 this is not the case, I tested the exact same flows on iOS 12, 14 and 15.