FCM not receiving notification after sometime on WiFi

Viewed 513

I am trying to integrate Firebase cloud Messaging to my iOS application. When I connect my phone to Xcode and install the application, push notifications works and are received by the device even after killing the application. However, after about 15-20 mins, the device just stops receiving notifications even if I opened the application again. It returns to the working state only after turning off WiFi and turning On Cellular network. It works for another 15-20 mins and the problem continues on WiFi.

I have tried sending to a specific topic, to a specific device and to all devices but the problem persists

1 Answers

So APNS performs throttling that is most likely to kick in if you send a ton of messages to the same phone, which is of course your default behavior when you are debugging push notifications themselves or things that are triggered by push notifications. It has nothing to do with Firebase.

What could help for you is that you simply "hotwire" the code that is triggered by push notifications at app boot (open app from push) or at a given moment after a timer (push received inside the app) to not have to rely on a third party mechanism that throttles every time you need to verify your code. So once you verified you get the basic message correctly, do the rest of your development by triggering those messages yourself instead.

Related