1

How do apps like messenger, whatsapp etc, are able to update their badges when you get new messages, given that you may have disabled push notifications ? (as I did)

In other words, what is the proper way to let the user know he got new messages thanks to the badge when he did not allow notifications ?

Do all these apps just scheduled a loop task constantly asking the server if there is something new ? This doesn't sound realistic nor efficient.

Or is there some mechanism that would allow the server to send the information to the app ? (given that notifications are disabled, again)

lapin
  • 2,098
  • 2
  • 21
  • 30

2 Answers2

1

You might want to look into Apple's PushKit framework. It's generally used for for VoIP calls. Unlike normal push notifications, the silent push from the PushKit framework is guaranteed by Apple to be delivered with high priority. Even if the user disables push notifications in the settings, these push notifications will still be received by the phone. Since both the app you mentioned has VoIP calls, PushKit framework can be used even if the user has disabled push notifications.

ebby94
  • 3,131
  • 2
  • 23
  • 31
0

On iOS8+, you can deliver silent push notifications to your app to update your badge, as long as the user has Background App Refresh on. It works even if the user has opted out of push notifications.

See question here: Is Silent Remote Notifications possible if user has disabled push for the app?

Cody
  • 650
  • 9
  • 16