Can push notifications be used to run code without notifying user?

Viewed 5814

I have an app which needs to communicate with a server (to refresh it's data) once every 24 hours. This needs to happen even if the app is not open, nor in the background.

Ideally what I'd like is:

  • Every 24 hours, my server sends a push notification to iPad
  • This wakes up the app, and runs the code necessary to refresh the data
  • The notification is then discarded

Is any of this possible?
Is the app only woken up AFTER the user clicks on the notification? Or can I run some code before showing the notification? Can I even discard the notification message?

If Push notifications are not the right way to do this, what is???

Thanks guys!

4 Answers

It is possible using a so called VOIP Push Notification. This notification can run code in the background, even when the app is completely closed.

Related