Skip to content

Cloud Messaging

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that enables you to send notifications and data messages to client applications. It is commonly used for push notifications, server-driven events, live updates, and re-engagement messaging.

The Cloud Messaging module in this plugin provides access to FCM tokens, topic subscriptions, notification permission handling, and message listeners on Android and iOS, allowing Unreal Engine applications to receive and react to messages sent from Firebase or your backend services.


Capabilities

  • Request notification permission on iOS and Android 13+.
  • Retrieve the current Firebase Cloud Messaging registration token.
  • Listen for automatic token refresh events.
  • Delete the current FCM token when needed.
  • Subscribe and unsubscribe users from messaging topics.
  • Enable or disable automatic Cloud Messaging initialization.
  • Receive incoming notification and data messages while the application is running.

Platform Notes

Android

On Android 13 and higher (API level 33+), notifications require the android.permission.POST_NOTIFICATIONS runtime permission. The plugin declares the required permission and provides Request Cloud Messaging Notification Permission to request it.

On Android 12 and lower, no runtime notification permission is required.

iOS

iOS push notifications use Apple Push Notification service (APNs) together with Firebase Cloud Messaging. Before receiving remote notifications, the iOS application must be configured for Push Notifications in the Apple Developer environment and APNs credentials must be configured for the iOS app in Firebase.

The plugin handles the notification authorization request, APNs registration, APNs token forwarding to Firebase Messaging, and incoming message callbacks internally.


Important Notes

  • FCM message delivery behavior depends on application state and platform restrictions. Notification and data messages may behave differently while the application is in the foreground, background, or terminated.
  • Token regeneration can occur at any time, so applications should listen for token update events if the token is stored or sent to a backend.
  • On iOS, Cloud Messaging requires valid Apple Push Notification configuration in addition to the standard Firebase setup.