jlcvp / fcm-node

A Node.JS simple interface to Google's Firebase Cloud Messaging (FCM) for Android & iOS & Web Notification and data push
MIT License
125 stars 48 forks source link

How to send push notification on ios device and multiple devices ?? #13

Closed singh7889 closed 7 years ago

jlcvp commented 7 years ago

as seen on the README file:

On iOS, set content_available when the app server needs to send a Send-to-Sync message. An inactive client app executes your logic in the background, while an app in the foreground passes the message to didReceiveRemoteNotification. As seen in FCM Docs)

Some iOS users report a delay receiving the notifications and even a 'not receive at all' scenario if the priority field is not set. This is due to a delivery policy with APN (See APNs Provider API for a more detailed info)

To send notifications for multiple devices, you must use the field _registrationids instead of to in your json message. See FCM HTTP protocol documentation for details