I’m wondering if it’s possible to create a simple seconds counter that is counting up in iOS Live Activities that would start from the provided unix timestamp and be relative to current date. For example: ’00:01′, ’00:02′, …
I know how to create a countdown timer, like so:
Text(Date(timeIntervalSinceNow: 60), style: .timer)
But I haven’t been successful in getting it to work the other way around, or finding much relevant information regarding this.
2
Answers
Please check this answer I hope it will solve your problem
As far as I know, there is nothing out of the box, you need to set this up yourself. So
you could try something simple like using a
Timer
and twovars
: