Conversation

Does anyone know how 3rd-party timer apps usually work?

You can’t just create and kick off a 10min Timer object, for example, because your app will get suspended in the background.

So I guess folks are just using background tasks to keep the Timer alive, and then fire off a local notification?

2
0
0

@jsq you can schedule local notifications; no need to keep the app running

1
0
0

@kylebshr @jsq you can even schedule a bunch of them (up to an undocumented limit, which if I remember right is 64).

It’s just for showing alerts and playing sounds. You can’t run tasks or get your app launched. But it’s pretty custom made for timer apps and other reminders.

0
0
0

@jsq never done a timer proper but lots of precise timing things when the app may background work more or less as expected with judicious push notifications

0
0
0
@jsq Yes. I have a couple of different timer apps which work that way — even recurring timers since you can schedule the local notification to recur too. If the user edits the timer, then simply cancel the pending local notifications and then reschedule new local notifications …

@kylebshr
0
0
1