Home > Software engineering >  VOIP token won't get invalid after uninstalling an app from a device or disconnected from the n
VOIP token won't get invalid after uninstalling an app from a device or disconnected from the n

Time:11-24

I am working on one VOIP-based application where one user calls another user everything works fine like calling and all.

But whenever I didn't log out from the application and directly uninstall the application at that time any another user tries to call the user who already uninstalled the application. At that time backend get a successful response from apple (i.e. 200 Success). Why won't give an error if that app is not installed

Actually, we need to give some specific alert to the user who called the person who already uninstalled the application but we are unable to find from backend too that the voip push failed.

One another thing just for testing : We tried to send FCM silent notification too which works synchronously with VOIP notification but in that too FCM gives success in backend while app already uninstalled from device.

If anyone facing same issue and having solution regarding that then please let me know.

CodePudding user response:

In the short term, Apple doesn't know that the user has uninstalled the app, so it accepts the push.

Pushes are delivered asynchronously (Since a device may be offline when you send the push; it will be queued for delivery later).

The APNs cannot provide immediate feedback on the delivery of your push. The 200 status simply means that the push was successfully accepted for delivery.

Eventually Apple will determine that the push token is invalid and return a 410 response. At that time you can remove the push token from your database.

In the short term you can detect if the device doesn't respond to the VoIP push in a reasonable time frame and return a "call failed" or "recipient unavailable" response to caller.

  • Related