App runs in the background

hey everyone,

I am working on a new app, timer app. And I want the app to run in the background, so for example if the timer started at 10 sec and you closed and opened the app it should show you 5 sec instead of 10 sec.

Simulator Screen Recording - iPhone 14 Pro - 2023-08-20 at 13.30.17

it works on the simulator but when I try it on my physical phone it doesn’t work ???
my phone is iPhone 12

Maybe search online for some suggestions using the following search criteria

“swift run timer on background thread”