iOS guidelines apparently don't allow to use background tasks for more than 10 minutes. I am designing a cooking timer app that allows the user to set a specific time and begins a count down.
However it appears impossible to set a background task (e.g. using UILocalNotification or adding an NSTimer to [NSRunLoop mainRunLoop]) that runs for more than 10 minutes.
Is there a work around this? How do developers designs apps that trigger timers that last longer than 10 minutes?
Possible solutions:
- A: use server service and run the timer remotely, push notification from server once timer finishes to "warn" user. Cons: expensive to run server, time costly to develop.
- B: once the app starts keep it active in the foreground (don't allow the screensaver to trigger). Cons: battery expensive.
Any other ideas?
EDIT: I would like the app to work with iWatch. Hence displaying a glance notification on iWatch once the timer should trigger. As this is guided by the iPhone app I would not be able to do so unless the app is active.