I have an app that uses Firebase for push notifications. I can hand Firebase my APNS Token and I get an FCM token, which I can use to push to that device from the Firebase console.
If the user disables push notification in the app (not the iOS settings app), I unregister the FCM token using the deleteFcmToken
method. If they subsequently re-enable notifications, I use retrieveFcmToken
to request a new one. But I've noticed that when I request a new one, I get the same one as what I had before I deleted it, and if I try to push to my device from the Firebase console with that token, it doesn't work.
How can I forcefully refresh a Firebase push token? Do I have to wait some minimum amount of time for some cache in Firebase to be cleared or something? Or is there a different API I should be using?