Here's what docs state:
The priority of the notification. Specify one of the following values:
10–Send the push message immediately. Notifications with this priority must trigger an alert, sound, or badge on the target device. It is an error to use this priority for a push notification that contains only the
content-available
key.5—Send the push message at a time that takes into account power considerations for the device. Notifications with this priority might be grouped and delivered in bursts. They are throttled, and in some cases are not delivered.
And about VoIP:
Instead of persistent connections, developers should use the PushKit framework—APIs that allows an app to receive pushes (notifications when data is available) from a remote server. Whenever a push is received, the app is called to action. For example, a VoIP app could display an alert when a call is received, and provide an option to accept or reject the call. It could even begin taking precursory steps to initiate the call, in the event the user decides to accept.
Do I understand correctly that apns-priority
defines message queuing at APNS side, and VoIP push type defines what happens on the device?
And what do they mean saying
It is an error to use this priority for a push notification that contains only the
content-available
key.
Will APNS return an error or is it just a bad practice?
P.S. I use AWS SNS for sending notifications and it does not support customisation of apns-priority
, but I am curious how it affects the process.
The main difference is that even if your app is closed voip notification can wake your app for kill/suspended state and user notification just shows an alert without waking up your app for more refer. Apple documentation for pushkit
The main difference is that VoIP notification
will launch your app if it's not running or was killed from app switcher and you need to handle the notification in your code, while the normal notification
will be shown immediately as local notification and will not start your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With