Firebase Messaging Unity Plugin shows notifications only in foreground

1.6k views Asked by At

As you guys might know, Firebase released their official (and BETA) Unity plugin for many of their services. I'm now testing their quickstart sample for FCM (Firebase Cloud Messaging), and I'm receiving the Push Notifications on iOS, but only when the app is on foreground, when I close the app or just leave it to run in the background, it won't show any notifications, but as soon as I open the app I will receive all the notifications that were sent while the app wasn't on foreground.

Any ideas on how to solve this?

Regards, Arturo M.

1

There are 1 answers

0
mayo On

For background notifications you have to enable the Remote Notifications option in Background Modules on Capabilities...

Capabilities > Background Modules > Remote Notifications

Or just add this to your Info.plist (which is the same):

<key>UIBackgroundModes</key>
<array>
    <string>remote-notification</string>
</array>