Search code examples
iosfirebasefirebase-cloud-messagingapple-push-notifications

On iOS only last sent data message is retrieved when the app back online


When I send via http V1 several data messages to my iOS app while it is in background, then when i put back my app online I receive only the very last data message in application:didReceiveRemoteNotification:fetchCompletionHandler:

In Firebase cloud messaging legacy http all the data messages was queued and I could retrieve them by calling setShouldEstablishDirectChannel and listening messagingDidReceiveMessage

How in http V1 can I retrieve when the app is back online all data messages that was sent when the app was in background ?


Solution

  • Unlike Data message, Notification messages are always collapsible as stated here. And it is expected that only the last notification is received. The same behavior is also set with APNS. You could check this post to know more about the behavior of notifications with APNS.