As you wrote in your question, this is mentioned in Apple Docs:
If you send multiple notifications to the same device or computer within a short period of time, the push service will only send the last one.
Link
The scenario is only that what you are describing will work if your whatsApp was open in the background when receiving these push notifications . That way, WhatsApp will treat them as local notifications and present them all in the notification center. If whatsApp was closed, you will receive only the last notification, like any other application.
You can easily check this:
- Finish whatsApp and enable
Airplane mode . - Send 5 messages from 1 to 5 to the device.
- Turn off
Airplane mode and lock your device. - You will see only one msg (the last one you sent aka "5") in the
notifications center .
Here's how whatsApp works:
While whatsApp is in the background, one push notification is received (the last user sent is “5” in our example). This msg will not be shown to the user.
whatsApp receives it in the application:didReceiveRemoteNotification:fetchCompletionHandler: and checks their servers if there are any notifications up to "5" that the user has not received. In this case, they will retrieve this data from their servers and present it to the user using local notifications , which is basically a way of presenting data and is generally not associated with APNS.
Segev Feb 16 '15 at 9:15 2015-02-16 09:15
source share