I am developing an discussion application. When my application receives a push notification I send a request to my php / mysql server to retrieve unread messages from the connected user. In my application I give the possibility for the user to disable notifications. My problem is that when notifications are disabled I can not send my request to php server. So I want to set up a timer in this case to retrieve unread messages at regular intervals (every 15 seconds). I wonder if this is a good practice thank you
push notification
How do you trigger the reception of the push in your app ?
Note that silent push notification (call of delegate on reception of push) work only if wifi is connected and the power supply is plugged (starting with iOS8).
If your application can be considered as VoIP, you get several ways to do it:
- permanent connection marked as VoIP to your webserver.
- register a keepalive (minimum 10 minutes)
- use pushkit notification