How to make a remote notification conditionally displayed?

In our app environment, multiple shifts of employees use the same phone. It is possible for our app to receive notifications intended for a prior user. Our notification extension can determine if the notification is for the current user. We'd like to hide the notification if its not intended for the currently logged in user.

Notification Extensions, (UNNotificationServiceExtension) apparently do not allow the notification to be hidden. It can be modified but will always be presented to the user.


Why?


Is there a way around this? I've tried sending silent notifications and generating local notifications. It works, but Apple/iOS starts throttling it after a few notifications and it becomes very unreliable.


Does iOS 12 add support to suppress a notification?

How to make a remote notification conditionally displayed?
 
 
Q