Search code examples
iosfirebasefirebase-cloud-messagingapn

iOS - How to detect uninstallation


Our App runs on iOS and Android and receives notifications via Firebase.

We need to be able to immediately detect when a user has uninstalled an App so that we can send notifications by another means (e.g. SMS or SMTP).

This is fine for Android as we can detect whether the App IID is still valid via the Firebase Admin API before we send a notification.

However this does not work for notifications to iOS. If a user uninstalls, Firebase still thinks the App IID is valid and forwards the notification onto the APN gateway (obviously nothing appears on the device because the App has gone).

So - how can a Server detect that an iOS app has been installed?

Thanks.


Solution

  • To answer your question in one word: No. It's not possible on iOS to detect the uninstallation of your app.

    EDIT: As a workaround you could save the date of the last app launch on the server and when it's e.g. more than >30 days in the past you mark the app as "probably uninstalled".