My application receives silent push notifications... works fine if the app is in foreground, but when moved to background it only receives them for a while (8-10 minutes) and after nothing for about one hour and after again few received (for 8-10 minutes) and again nothing...
I also realised, that calling
FIRMessaging.messaging().appDidReceiveMessage(userInfo)
in background is causing this warning:
FIRMessaging receiving notification in invalid state 2
I am wondering, if these two things can't be linked... Firebase stops sending silent push messages after a while, because they are not confirmed when received in background???
Thanks a lot, Jan
UPDATE:
One part answered by Firebase support. There is no link between this warning and notifications delivery. Confirmation is used only for Analytics, for nothing else. Warning to be corrected, but not linked to my issue.
UPDATE:
I have just found these questions, which are describing the issues with silent push notifications delivery in background:
Silent push notifications only delivered if device is charging and/or app is foreground
iOS8.1.2 didReceiveRemoteNotification method not called when device is not plugged in
No obvious solution there... at least I don't see it.