I understand that APNS cannot be relied upon for data delivery and it can be disabled by the user. So, an alternate mechanism must be used for realtime polling of the server.
What do you recommend to do on both client and server?
You’ll want to look into node / socket.io
Here is a link to an example chat client.
There are other options as well as third party solutions such as firebase. However in general we prefer to ‘own’ our stack and run it all on amazon so we are not tied into too many third party services for critical functionality.
What you’re looking for overall is a socket / web socket based approach rather than traditional polling. This will keep things lightweight and real time.
Thanks for your quick reply!
- This doesn’t drain the battery on the phone since it seems a permanent connection is open with the server?
- What happens if the user puts the app to the background/pauses it and the server sends data to the app?