Hi everyone,
I’m using Xano as my backend and @despia to convert my WeWeb app into a truly native iOS app. It’s a beautiful solution - the native plugin makes the process super easy, it works flawlessly, and their customer support has been outstanding. Public thanks to the Despia team for all the help getting everything set up.
For push notifications, I’m using a combination of Despia + OneSignal.
My question:
Despia automatically assigns a player_id to every device that installs the app. I’d now like to associate that player_id with the logged-in user, so that:
-
App is downloaded on iPhone A → Despia assigns a
player_idto that device. -
User X logs in on iPhone A → I link the
player_idto User X in Xano. -
User X logs out, User Y logs in on the same iPhone → I unlink the
player_idfrom User X and link it to User Y.
This way, if I send a notification to User X, it only reaches the correct devices — not whichever user is currently logged into that iPhone.
I considered “clearing” the player IDs list on sign-out, but I don’t love that approach, since if a session expires they wouldn’t get notifications anymore — and I still want them to.
Any best practices you’d recommend for handling this mapping?
Thanks a lot in advance!
Jorge