Back

Push Target Handling

  • 0
  • Flutter
  • General
  • Android
  • Messaging
  • Apple
frankenstein
21 Mar, 2024, 06:18

Appwrite handles push targets as user based. The biggest issue the situation where to cant trigger delete_push_target like user deletes an app and reinstalls. Currently am handling push_targets by assigning ID same as session ID so when user logs out i also delete his/her push. But when user deletes an app then i cant delete that push, so the database will be full of targets with expired tokens. Also i cant assign userID to because a user can login to multiple devices. Whats the best way to handle push targets?

TL;DR
Developers suggest assigning target_ids to UDIDs and allowing target overrides when users log in with new accounts to better handle push targets. Currently, the issue arises when users delete an app and reinstall it, leaving expired push targets in the database. One developer suggests using the session ID for push target IDs to delete them when users log out. However, this only works for user logouts, not app deletions. The desired solution involves finding a way to handle push targets effectively, possibly by implementing target_id to UDID mappings and allowing overrides for target accounts when users switch accounts.
frankenstein
21 Mar, 2024, 06:24

My suggestion is to allow us to assign target_id to UDID. also allow overrides of targets where by if user logouts and logins with another account. then the target is overriden to a new user account.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more