Hi,
we start and update Live Activities with ActivityKit push notifications in our app, but want to do so only if the user is logged in. Therefore we only send the pushToStartToken to the server when a user logs in (or when the token changed and the user is still logged in.)
When the user logs out, we remove that start token from our server so that no LA can be started while the app is in the logged out state. This means that the logout isn't happening immediately but is waiting for that deletion request to succeed. This could also fail and lead to the use rnot being able to log out, e.g. if the user has no internet access.
If that deletion request would be fire and forget, we would end up in a state where the server still has the token and might start LAs without any user being logged in.
The token flow for Remote Push Notifications is different, on the other hand: requesting a token asynchronously via UIApplication.shared.registerForRemoteNotifications() but invalidating it synchronously (at least from the app's perspective) on logout via UIApplication.shared.unregisterForRemoteNotifications(), which makes it way easier for us to make sure the app does not get notifications when no user is logged in.
We're wondering if we're just holding it wrong or if our way of handling the LA token deletion is indeed the intended one?