Overview

Firebase Cloud Messaging (FCM) is a cross-platform messaging service provided by Google Firebase that allows servers to send push notifications and data messages to mobile devices.

FCM simplifies push notification infrastructure by providing:

On iOS, FCM does not replace Apple Push Notification Service (APNs). Instead, it acts as a layer on top of APNs.

Example use case:

A server sends a push notification through Firebase → Firebase forwards the request to APNs → APNs delivers the notification to the iPhone.


Notification Delivery Flow

The push notification pipeline when using FCM on iOS looks like this:

App registers with Firebase
        ↓
Firebase generates FCM registration token
        ↓
Firebase internally maps FCM token to APNs token
        ↓
App sends FCM token to backend
        ↓
Backend sends push request to Firebase
        ↓
Firebase forwards request to APNs
        ↓
APNs delivers notification to device

Architecture

The architecture for push notifications with Firebase looks like this:

Backend Server
        ↓
Firebase Cloud Messaging
        ↓
Apple Push Notification Service (APNs)
        ↓
User's iPhone

Key takeaway:

FCM → APNs → Device