0

How should I change how a remote notification is presented in iOS before the system presents it? In fact, silence it. There are times where my app has canceled a Firebase topic subscription locally, but that cancellation is not delivered to the server in time. So, when our app is not running(in the background OR NOT RUNNING AT ALL), the server would still send a message to that Firebase topic and iOS will receive it.

My question is, how can I intercept a notification, and check whether it should be presented and silent it if needed? I need to support iOS 9 as well so UNNotificationServiceExtension does not suit my needs.

Thanks.

Nicholas
  • 747
  • 7
  • 23

1 Answers1

0

That's a great question and currently there is no solution for this problem o iOS.

You can read about this on the Apple guide for local and push notifications.

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/

PS: If by silent you meant change the sound that the notification makes, you can do it. https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ModifyingNotifications.html#//apple_ref/doc/uid/TP40008194-CH16-SW1

Guthyerrz
  • 27
  • 5