Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Firebase Push Notifications not working for some iOS users

$
0
0

Okay so I have a React Native app that uses React Native Firebase (https://v5.rnfirebase.io/) to handle push notifications. Everything works fine for most users of both platforms, but specifically some of our iOS users are simply not receiving notifications.

After doing some digging, we found that the problematic users had FCM Tokens shorter than expected (this is saved in our DB). So we started to wonder if that was the problem, maybe we needed to refresh this token in order for things to work properly. We already know that re-installing the app and re-accepting permissions solves the issue, but we would like to avoid having to ask our users to do that.

We attempted to force a token refresh through source-code, for one specific user. We tried to run this code for one specific problematic user:

await firebase.iid().delete();return firebase.messaging().getToken()

This was supposed to delete the firebase instance to force a refresh of the token, hopefully fixing the problem. Apparently the token was updated, but our user still is not getting notifications.

Does anyone have any input as to why this might be happening? Any suggestions on how we could solve this using code push only?

OBS: RN version 0.61


Viewing all articles
Browse latest Browse all 16552

Trending Articles