There are various options for preprocessing and changing the notification payload on iOS.
Up to iOS 10
You can send silent notifications that will not be shown to the user. Our application will wake up when it is completed or in the background, and you can pre-process the contents of the notifications. Read more about how to configure it here. However, this type of notification is not 100% reliable and should not be abused, for example. used for all notifications that need to be delivered, as Apple may stop sending notifications after several messages.
Another option: if your application supports VoIP
. This way, your application will pretty much always listen to push notifications, and you will always be ready to pre-process notifications before you show them. However, if your application does not have real VoIP
capabilities, for example. Apple application will be rejected by Apple in the review. Here is a great tutorial on how to set it up.
From iOS 10
With the introduction of iOS 10, we are finally able to pre-process our notifications, even when the application is in the background or terminated. No need for VoIP
settings or special types of notifications. Here is a great tutorial on how to set it up.
source share