Push Notifications are not delivered to a good percentage of users

Hi all,

In the app I developed for iOS I am using Firebase SDK (cloud messaging FCM) to provide the topic feature to deliver notification to thousands subscribed iOS users. I know FCM does not directly deliver the notifications to the final users and this is just an intermediary that formats the notification in way the APNs can understand client by client (using the APN device tokens) and this service (APNs) is in charge of delivering the notifications to the final users. The notifications are sent from a linux server through a cURL request to FCM. One example of silent notification that is like a heartbeat is below:

!/bin/sh
notifID=`date +"%Y%j"`
value=`date -u "+%s.%N"`

curl -H "Content-type: application/json" \
 -H "Authorization:key=XXXXXXSECRETXXXXXX"  \
-X POST -d '{ "to": "/topics/ioschannel","content_available":true,"data":{"notificationType":"silentNotification","silentNotificationId":"'$notifID'","senttime":'$value'},"priority":"high","headers":{"apns-priority":"10"},"time_to_live":60}' \
https://fcm.googleapis.com/fcm/send

In the below image you can see some statistics provided by the metrics in the Apple Push Notification Console.

We currently have almost 5.5k users who have mainly installed the app on their iPhones. As you can notice the APNs received a bit more than 5k notifications but what it is remarkable is the fact that only about 70% of the users receive the notification on their devices. Few notifications are on the APNs storage and delivered later on. Some devices can be offline and others are can be on power save mode but I don't understand why so many users are not receiving the notification (this particular notification is sent at 5 pm local time).

Aside from the example silent notification I send other notifications to be processed in the background in the app in order to evaluate and decide to present or not a notification on the notification bar with a sound. The situation is the same, almost the same percentage don't receive the notification and almost 70% receive them on time.

I have another app in Android and I don't have this problem. More than 90% of the users receive the notifications. What it is really interesting about Android is that the user can provide the permission to remove the app from the battery optimization. This is really important permission because the Android OS provides resources (network and giving priority to received push notifications) and even in power save mode the notifications are delivered.

If I go straight from our linux server to APNs this situation won't change because APNs cannot deliver the notifications.

Why is this happening? Is there any way to provide a permission to the app to have the highest priority?

Any advice, feedback or hint will be really appreciated.

Push Notifications are not delivered to a good percentage of users
 
 
Q