I'm writing an iPhone app for a client, and they have requested a feature whereby the app "wakes up" at certain times during the day to display a message to the user.
I'm well aware that I can't have the application run in the background and simply move to the foreground at the appropriate time (short of requiring jailbreaking, which isn't really an option for a commercial app). What I'd ideally like would be to simply have the system schedule the application to be run at a particular time of day.
As far as I can tell, the only way to achieve this seems to be to implement push notifications and have a server send the app a message at the appropriate time of day. But this is really ugly and undesirable for several reasons:
- It requires a constant internet connection on the user's phone (something that I can't really assume)
- It places a large burden on the server in having to keep track of these times (which may be different for each user)
- Its just a generally crappy workaround - that's not what push messages are designed for, a dedicated scheduler seems like a much better option.
Does anyone know of a better alternative?