The ActivityKit API requires developers to parameterize calls to pushToStartTokenUpdates by the live activity's attributes, e.g.
for await data in
Activity<AdventureAttributes>.pushToStartTokenUpdates {
// Send token to server.
}
for await data in
Activity<BoringAttributes>.pushToStartTokenUpdates {
// Send token to server.
}
At runtime, I have noticed that the token is the same for the different live activity attribute types we support in our app.
Can someone confirm if this behavior is consistent? If the pushToStartToken is the same across different live activity types, it can simplify our database design 🙏🏼.
Currently you will receive the same push to start token for your app. But we would highly recommend against coding for that assumption, as this could change in the future, and it would be easier to make the effort now while designing the database than to change things later when you have a database full of accounts and tokens.
Argun Tekant / DTS Engineer / Core Technologies