iospush-notificationwhatsappviber

Push notifications instant message receiving like on Whatsapp or Viber


When Whatsapp (or Viber) iOS application is completely turned off (removed from the background) message receiving is handled via push notifications as expected.
When you wake up Whatsapp (or Viber) from push notification, it instantly shows all received messages without explicitly taking any time to download them from the server.
Actually, it looks like every push notification wakes up the app for enough time to download message that had been sent, which is, I belive, impossible in iOS.

Does anyone have an idea how did they implemented that fast receiving of bunch of messages?


Solution

  • You should probably use PushKit, along with the Voice over IP background mode enabled in your Xcode Project > Capabilities pane. That way VoIP push notification can wake up your application, so you can process the received data and display it. Also VoIP pushes have several advantages over standard push notifications. More info can be found here.