Sending a notificaition to multiple IOS devices

48 views
Skip to first unread message

Tran Ho

unread,
May 25, 2020, 9:47:34 AM5/25/20
to pushy
Dear, 

I am working on the project which needs to send the notification to multiple devices. In the FCM, if you send a notification to a 'topic' which is subscribed by many subscribers, then the subscribers can receive this notification.
I am wondering if the Pushy-APNS can handle it? I have checked the APNS HTTP/2 but it seems this service doesn't support this use case. So I just wanna make sure before thinking of the alternative solution without PushyAPNS.


Thanks in advance.



Jon Chambers

unread,
May 25, 2020, 10:12:07 AM5/25/20
to pushy
The HTTP/2 APNs API only supports a model where notifications are sent to one device at a time. FCM is building an abstraction on top of that; under the hood, they're doing something like:

for (final String deviceToken : getTokensSubscribedToTopic(topic)) {
    sendNotification
(deviceToken, topic, ...);
}

Pushy itself tries to model the APNs protocol as closely as possible, and so doesn't offer that kind of higher-level abstraction. That said, there's no reason you couldn't just use a `for` loop with Pushy to do what you want to do.

-Jon

Tran Ho

unread,
May 25, 2020, 10:15:14 AM5/25/20
to pushy
Hi Jon,

Thanks for your fast reply.
Reply all
Reply to author
Forward
0 new messages