I have an app that pairs with a wearable Bluetooth device that collects users' health data. My web backend sends two push notifications every hour to all app users—one at XX:05 and another at XX:15. The first notification instructs the app to download data from the paired wearable device, while the second prompts the app to upload the downloaded data to the backend server's database.
However, I’ve noticed that many push notifications are not processed by iOS apps, especially at night. Based on Apple's documentation, iOS prioritizes push notifications and may ignore lower-priority ones to conserve battery life.
Is there a way to increase the priority to ensure that more (or all) push notifications are processed?
Would integrating the HealthKit framework help? Currently, I use Firebase Cloud Messaging (FCM) to send push notifications. Additionally, my app falls under the Health & Fitness category. Would changing it to Medical increase priority? P.S. I understand that Apple requires certain certifications for an app to be classified as Medical.
It is not possible to increase the delivery priority, and the rate of passing of the notification to the app for processing of silent background notifications.
If your background notification also includes an "alert" entry, then you can increase apns-priority
to 10, which will prevent the delivery delays of low priority notifications, but will not help with the rate of passing the notifications to your app.
If you want to execute code in response to every notification you send, then I suggest looking into using a Notification Service Extension.
The Notification Service Extension will be executed for every visible push notification. So, it could serve your needs, as long as the user has not disabled the visibility of your notifications through various settings. Although, the service extension will not be executed for push notifications that will not be presented visually, if your goal is to do all this silently.
Argun Tekant / DTS Engineer / Core Technologies