DEV Community

Developer On Wheels
Developer On Wheels

Posted on

Trying to Build a Simple Live Activity Timer… and Hitting OS Limits

I thought it would be simple: show a custom timer counting up inside a Live Activity. Sounds like the perfect use case, right?

Turns out — not so much.

On iOS, Live Activities are heavily restricted. There’s no way to just run a continuous, updating timer in the background. You can’t refresh every second with push notifications (unless you want to spam Apple’s servers and drain the battery). Even the local ActivityKit updates are limited in frequency.

So what looks like a trivial feature — a live-updating timer — is almost impossible to do cleanly. The official design assumes you’re showing snapshots of state that update occasionally, not a precise counter.

Still, I wanted it badly enough to hack something together. It’s not perfect, but in my projects — Bump Pulse (a free contraction timer) and Nurtura (a baby growth tracker) — I integrated Live Activities anyway. They give parents a quick way to glance at what’s going on without opening the app, even if the timer behind it isn’t as smooth as I’d like.

It was a good reminder: just because something looks simple in the UI doesn’t mean iOS makes it possible under the hood.

Screenshot of a Live Activity on lock screen with a running timer

Top comments (1)

Collapse
 
ahrjarrett profile image
andrew jarrett

As someone who doesn't know much about native apps, it's cool to learn about some of the limitations you bump up against. Thanks for sharing.