I have a live activity and even after a couple of times that it has shown on my lock screen it keeps prompting the user to tap on Don't Allow or Allow. Can someone help me understand why this is happening? I would like my users to only hit Allow once and not be prompted again, otherwise they would not be registered for updates, since update token only generates after selecting Allow.
Ok, I do spend way too much time looking at the live activities and the behavior of how the system behaves, when a Push-to-Start Live Activity is triggered, iOS displays an inline prompt underneath it asking for permission to start Live Activities usually with Allow and Don't Allow buttons. If a user simply ignores the prompt, unlocks their phone, or dismisses the Live Activity without explicitly tapping "Allow" or "Don't Allow," iOS registers the permission state as like undecided. Because the system never received a definitive answer, it will continue to attach this prompt to future Push-to-Start Live Activities. It only stops prompting once the user explicitly makes a choice which explains why it resolves after the 3rd or 4th time when the user finally taps the positive button to make it go away.
The Push-to-Start prompt only appears when a Live Activity is initiated remotely via a push notification while the app is in the background or closed. Try a sample where start the very first Live Activity locally with the request api for LiveActivity, while the app is in the foreground. You can then use standard push notifications to update that Live Activity without any prompts.
There is something that is important on the workflow, you cannot programmatically force the "Always Allow" prompt to appear on the first try. Since you cannot force the "Always Allow" button to appear on the Lock Screen, you have to rely on user education and in-app routing. There are reasons for that main in my opinion looks like by design to ensure apps don't hijack the Lock Screen without explicit, repeated user consent.
I do know this is a complicated workflow and I always my recommendation is when you get the update token user it to make sure the user decides to tap “Always Allow” when they are prompted.
Albert Worldwide Developer Relations.