简体   繁体   中英

What is difference between GCM for iOS and push notification service provided by Apple

I am reading about Apple push notification for iOS. While searching I found that Google also providing GCM service to iOS devices GCM for iOS . I am having below doubts-

  1. is there any difference in between them?
  2. I am not understanding if apple also providing same thing ,why google introduce GCM for iOS ?
  3. What will be the scenario/requirement to use GCM for iOS and Apple push notification service.

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 are already all you infrastructure set for GCM, then you may save you a bit of code by supporting only GCM to address both iOS and Android.

For more details, you may use this Official Google Document: https://developers.google.com/cloud-messaging/ios/client

Link below is a Google Cloud Messaging IOs Quickstart app, it demonstrate how to connect an IOS app to GCM and how to receive messages: https://github.com/googlesamples/google-services/tree/master/ios/gcm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM