Realtime is a pub/sub message broker, meaning that when a message is sent to a given channel, all subscribers of that channel will receive a copy of the sent message. 

Realtime Push Notifications work exactly in the same way. 

If you use the Realtime API subscribeWithNotifications method to subscribe all users of your app or website (using Web Push), to the same Realtime channel (for example "global"), you just need to send a message to the "global" channel and all users will receive a push notification containing the sent message. Even if they are subscribing from different platforms (APNS or FCM).

If you have followed our Web Push Example in https://framework.realtime.co/demo/web-push/ you can simply get rid of the generateUserChannel function (that generates a random channel for each user) and enter a hard-coded channel name like in the code below:


//var channel = generateUserChannel();
var channel = "global";
Did this answer your question?