【问题标题】:What is difference between GCM for iOS and push notification service provided by AppleGCM for iOS 和 Apple 提供的推送通知服务有什么区别
【发布时间】:2016-01-22 07:02:52
【问题描述】:

我正在阅读有关 iOS 的 Apple 推送通知。在搜索时,我发现 Google 还为 iOS 设备提供 GCM 服务GCM for iOS。 我有以下疑问-

  1. 它们之间有什么区别吗?
  2. 我不明白苹果是否也提供相同的东西,为什么谷歌 介绍适用于 iOS 的 GCM 吗?
  3. 将 GCM 用于 iOS 和 Apple 推送的场景/要求是什么 通知服务。

【问题讨论】:

    标签: android ios google-cloud-messaging apple-push-notifications


    【解决方案1】:

    Google Cloud Messaging 最初是一个为 Android 发送通知的平台。他们添加了一个 iOS SDK,但在 iOS 上使用他们的 SDK 意味着您同时使用 GCM 和 Apple 推送通知服务:

    Push for iOS 设备 => Google Cloud Messaging => Apple APNS => 设备

    如果你只是开发一个iOS应用,最好直接使用APNS。如果您已经为 GCM 设置了所有基础架构,那么您可以通过仅支持 GCM 来处理 iOS 和 Android 来节省一些代码。

    更多详情,您可以使用这个谷歌官方文档:https://developers.google.com/cloud-messaging/ios/client

    下面的链接是一个 Google Cloud Messaging IOs 快速入门应用,它演示了如何将 IOS 应用连接到 GCM 以及如何接收消息:https://github.com/googlesamples/google-services/tree/master/ios/gcm

    【讨论】:

      猜你喜欢
      • 2010-12-10
      • 1970-01-01
      • 2010-12-08
      • 2015-05-27
      • 1970-01-01
      • 2017-11-18
      • 1970-01-01
      • 2015-01-06
      • 1970-01-01
      相关资源
      最近更新 更多