Apns-collapse-id doesn't work for critical messages

Recently I wanted to dismiss previous notification. Because there is no such feature yet for iOS, I decided to “override” it by subsequent message.

Then I found it doesn’t work. Trying to narrow the reason down I found it doesn’t work for critical messages (while it works for normal ones)
I’m not sure it’s known issue. If it’s iOS limitation then this information is missing from Notification documentation.

Here is my code:

{
    "title": "Washing Machine",
    "message": "Washing machine has just finished after %s",
    "data": {
        "attachment": {
            "url": "https://www.freepnglogos.com/uploads/washing-machine-png/washing-machine-icon-download-png-and-ico-icon-easy-4.png",
            "content-type": "png",
            "hide-thumbnail": false
        },
        "apns_headers": {
            "apns-collapse-id": "washingm-emptied"
        },
        "push": {
            "badge": 0,
            "category": "WASHINGMACHINE_EMPTY",
            "sound": {
                "name": "default",
                "volume": 0.1
                "critical": 1
            }
        }
    }
}

Edit: I found a mention in this document: https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages
Seems it’s independent from HA. It would be nice if HA docs notice that.

Hi I ran into this issue also. Make sure to include a ‘thread-id’. This also works for critical notifications!

This is correct – critical notifications are not allowed to collapse, by Apple’s rules.