When set live activity dismissalPolicy: .after(endTime), the dynamic island not working

I have app that shows live activity and countdown till a date...

VStack {
 Text("Countdown till You finish your homework")
 Text(countdownTime, style: .timer)
}

After the time up, the live activity countup, the solution is to update the live activity via backgroundTask and this not always working, really apple sometimes fire the backgroundTask after hours.

Another solution is to set dismissalPolicy: .after(countdownTime), but once I did that the dynamic island not working and the activity status is ended after right calling...

await activity.end(using: state, dismissalPolicy: .after(countdownTime))

Can anyone help please, users feed back is why you we still see the old task on live activity. How come I can not update live activity? and how come if you set dismissalPolicy .after apple changes the activity status to ended and stop showing the dynamic island?

Post not yet marked as solved Up vote post of iTarek Down vote post of iTarek
1.3k views

Replies

Same here. You can only rely on push notification. (which is not reliable neither...)

And I don't know why Apple refuse to reuse the Timeline API in the new ActivityKit...

Post not yet marked as solved Up vote reply of Gong Down vote reply of Gong

how to fix it ,same pro

up