Notification filtering entitlement for an on-call pager heartbeat — none of the form's use cases fit

We build an internal on-call pager app for our engineers, distributed through TestFlight only. Our server sends a heartbeat push to each device every 4 hours. The Notification Service Extension uses it to re-arm a dead-man's-switch alarm on the device: if heartbeats stop arriving, the alarm goes off and the engineer knows the paging pipeline is down.

The heartbeat has to be an alert push with mutable-content, because that is the only push type that reliably launches the extension, including when the user has swiped the app away. Background pushes don't work here: they are throttled and are not delivered to an app the user has force-quit, so the dead-man alarm would fire falsely.

The problem is that every heartbeat leaves an entry in Notification Center. It carries nothing actionable, and it teaches on-call engineers to ignore notifications from a pager app. Real alerts are always shown, and the extension still shows a visible notification when a heartbeat detects a problem (missed alerts, failure to re-arm). We already send heartbeats with interruption-level passive and an apns-collapse-id, so it is a single quiet entry, but it is still there.

com.apple.developer.usernotifications.filtering would solve this exactly. However, the request form requires picking one of four use cases (end-to-end encrypted messaging, earthquake warnings, education alerts, healthcare alerts), and ours is none of them. An earlier reply on this forum said other use cases are welcome to apply (https://developer.apple.com/forums/thread/676672), but the form no longer offers a way to describe one.

Questions:

  1. Can an app whose use case is outside the four listed apply for the entitlement? If so, how should we fill in the required use-case field?
  2. If not, is there a supported way to have an alert push launch the extension without leaving an entry in Notification Center? For example, is it supported for the extension to remove its own delivered notification with removeDeliveredNotifications(withIdentifiers:) after calling the content handler?

Thanks!

Thanks for the post.

Have you already applied for the com.apple.developer.usernotifications.filtering entitlement?

About push alert for an alert push with mutable-content: 1 is that it represents a user-visible notification. Using an alert push + filtering entitlement as a guaranteed, un-throttled background execution mechanism to bypass content-available: 1 throttling and force-quit suppression is probably not what that entitlement was designed for, then again, I do know work in that team.

May I suggest an alternative that may work using the workflow and technical solution you are trying to resolve. What about (apns-push-type: background, content-available: 1, apns-priority: 5), the key here is the priority 5 APN. As you can send this more frequently, like, every 30 to 60 minutes? When the user has not force-quit the app, iOS delivers background pushes periodically and wakes the main app in the background. Then have your app send an HTTP ACK to your server whenever it processes a silent background push. Just an HTTP request in the background is enough. Only if the device fails to ACK background within your 4-hour window meaning the user force-quit the app, the server escalates and sends the alert + mutable-content: 1 push? The idea here is to keep sending the request from the app in the background.

What about Live Activities, it seems like the perfect solution to have a Live Activity? Live Activities can be updated via APNs (apns-push-type: liveactivity), and you can display “On Call Active” Last heartbeat 2m ago" indicator in the Dynamic Island / Lock Screen rather than a stale notification in the Notification Center history list? Live Activity pushes updates to the widget UI via WidgetKit rather than running arbitrary code in UNNotificationServiceExtension, so you would combine this with local scheduled alerts?

Wouldn’t a Live Activity be a little more interesting and useful for your workflow?

Albert  WWDR