(2) I don’t remember the specifics but IIRC the Apple and Google push notification docs said to stop sending notifications to devices that have been unregistered. Other parts of the Apple push notification system do have rate limiting built-in and it seems prudent to also be responsible when it comes to unregistered device tokens.
The Google docs say:
The provided registration token is not registered. A previously valid registration token can be unregistered for a variety of reasons, including:
- The client app unregistered itself from FCM.
- The client app was automatically unregistered. This can happen if the user uninstalls the application or, on iOS, if the APNS Feedback Service reported the APNS token as invalid.
- The registration token expired. For example, Google might decide to refresh registration tokens or the APNS token may have expired for iOS devices.
- The client app was updated, but the new version is not configured to receive messages.
For all these cases, remove this registration token and stop using it to send messages.
(3) It is expected behavior to sometimes receive “ok” when the client has uninstalled the app.
The Expo push notification service will return “ok” in the push tickets once the notification has been delivered to Expo, and may or may not return “ok” in the push receipts once the notification has been delivered to Apple or Google. You should be looking at both the synchronous push tickets and asynchronous push receipts that are made available later.
The status and other information in push receipts is based the response from Apple or Google. One thing to note is that neither service reports the actual delivery of the notification. They just report whether the Apple or Google servers successfully received the notification, not whether the client device received the notification. In turn, the push receipts do not specify whether the device received the notification.
After some time – perhaps on the next notification, or whenever Apple or Google’s servers learn that the device no longer will receive notifications – they will send back information saying the device is no longer registered for notifications. When this happens, the Expo push receipt will contain the