1

What I need to do is fetching content on iOS from network at a specific time (let's say 21:00) on a daily basis.

If I use background fetch approach: there is no guarantee that fetching happens at a specific time. Also, there is no guarantee that it happens at any time at all since if user kills the app explicitly no fetch occurs.

If I use local notifications: I cannot execute anything as my app does not wake up from background state, therefore no fetch at all.

Is there any way to achieve that on iOS? Am I missing a point about local notifications or background fetch?

Mert Buran
  • 2,989
  • 2
  • 22
  • 34
  • Why does it have to be at exactly that specific time? Why can't it be the soonest after that time that it can? After all, the user might not even have a network connection at that time, or their phone might be off. – Gavin May 22 '15 at 15:36
  • If you need specific times, then you have to implement push notifications. If you're OK letting iOS determine when the appropriate time is, then you can use background fetch. But you cannot have an standard app do a fetch at a pre-determined time every day by itself. – Rob May 22 '15 at 15:58
  • Silent push is no longer an option for this since 8.1. Since 8.1 the pushes are only delivered "on time" if the device is being charged. If its not being charged it frequently won't be delivered until several hours later. Foreground push is also no good as it would require user interaction. Silent push also has the limitation that the user could kill the app. The answer to your question is its just not possible. – Gruntcakes May 22 '15 at 19:04
  • I don't know what you expected from a local notification, but it sounds like you think its delivered to the app? A local notification is for the user, the app would only get run if the user clicks on the local notification. – Gruntcakes May 22 '15 at 19:06

0 Answers0