Is there any reason to use Google GCM vs Apple messaging for push notifications?

眉间皱痕 提交于 2019-12-03 09:39:04

问题


Google has this Google Cloud Messaging info for integration with iOS

What is the difference between using Google Cloud Messaging or iOS for the same purpose?

Is one more efficient than the other? Is battery or network load different?


回答1:


Google Cloud Messaging is originally a platform to send notification for Android. They added an iOS SDK, but using their SDK on iOS means that you are using both GCM and Apple Push notification service:

Push for iOS device => Google Cloud Messaging => Apple APNS => Device

If you are only developing an iOS app, it is best to use APNS directly. If you already have all your infrastructure set up for GCM, then you may save you a bit of code by supporting only GCM to address both iOS and Android.

However there is no specific technical benefit doing so.




回答2:


In addition to the other answer, GCM supports upstream sending (sending messages from the client to the server), which APNS does not.



来源:https://stackoverflow.com/questions/31661205/is-there-any-reason-to-use-google-gcm-vs-apple-messaging-for-push-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!