3
votes

I have a server and an App for Android that's using GCM for push notifications, everything works well, I need to start creating an iOS app to do the same. GCM currently supports iOS: https://developers.google.com/cloud-messaging/ios/start

My understanding with the architecture is as follows:

Android GCM:

App->GCM->App->Server (Requesting/Registering Tokens)

Server->GCM->App (sending push notifications)

Is the following correct for iOS using GCM?

App->APNS->App->GCM->App->Server (Requesting/Registering Tokens)

Server->GCM->APNS->App (sending push notifications)

If my understanding is correct, why would I use GCM as it seem to add an extra layer and possibly delays on push notifications? Are APNS limits bypassed/handled with GCM? (ie, Payload size, message storage time, no collapse keys support)

1

1 Answers

4
votes

Your understanding is correct. The advantage of GCM is that your server only needs to implement GCM's interface for sending both Android and iOS notifications. The interface of APNS is somewhat more cumbersome and harder to work with.

Also, GCM provides some advanced features like topics, data messages (up to 4k), upstream messages (device to server), delivery receipts and so on. They might or might not be useful for you.

And no, GCM doesn't work around APNS' limits.