HI!
Some time ago we asked this question for ios 5.6 [Content removed] As some changes were done in the engine side, we waited for the 5.7 update to check this issue again.
The behaviour depicted in the previous question is the same in 5.7, but we have went a little bit further in order to identify what is happening behind the scenes.
First, we have push notificaitons on the project configured for iOS as it follows, having enabled the settings “Enable Remote Notifications Support” and “Enable Background Fetch”.
When the app is closed, if we send a push notification with the following payload, the push notifications are stored in the notification center. When we open the app using the push, it’s processed, and the rest are still kept on the notification center.
{"aps":{"alert":{"subtitle":"subtitle","body":"body","title":"No badge"}}}Then, if we send a push with the next payload, the notifications are still kept on the notifications center, but when we open the app using any of the notifications, they’re all deleted from the notification center.
{"aps":{"alert":{"subtitle":"subtitle","body":"body","title":"badge one"},"badge":1}}Also, if we have notifications stored in the notifications center, if we send a push with the following payload, all the notifications are deleted, as the app is opened in background and the push is processed, because the “content-available” flag is set
{"aps":{"alert":{"subtitle":"subtitle","body":"body","title":"content test"},"content-available":1,"badge":1}}But if instead, we send the following, the notifications are still kept.
{"aps":{"alert":{"subtitle":"subtitle","body":"body","title":"content test"},"content-available":1}}
So, we think, at somepoint, the push notifications are being deleted after the app is opened and somehow it’s related to having the badge number set.
Regards.
[Attachment Removed]