簡體   English   中英

iOS 版 GCM 與 Apple 提供的推送通知服務有什么區別

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

我正在閱讀有關 iOS 的 Apple 推送通知。 在搜索時,我發現 Google 還為 iOS 設備GCM for iOS提供 GCM 服務。 我有以下疑問-

  1. 它們之間有什么區別嗎?
  2. 我不明白蘋果是否也提供同樣的東西,為什么谷歌為 iOS 引入 GCM?
  3. 將 GCM 用於 iOS 和 Apple 推送通知服務的場景/要求是什么。

Google Cloud Messaging 最初是為 Android 發送通知的平台。 他們添加了一個 iOS SDK,但在 iOS 上使用他們的 SDK 意味着您同時使用 GCM 和 Apple Push 通知服務:

推送 iOS 設備 => Google Cloud Messaging => Apple APNS => 設備

如果你只是開發iOS應用,最好直接使用APNS。 如果您已經為 GCM 設置了所有基礎設施,那么您可以通過僅支持 GCM 來處理 iOS 和 Android 來節省一些代碼。

有關更多詳細信息,您可以使用此 Google 官方文檔: https : //developers.google.com/cloud-messaging/ios/client

下面的鏈接是 Google Cloud Messaging IOs Quickstart 應用程序,它演示了如何將 IOS 應用程序連接到 GCM 以及如何接收消息: https : //github.com/googlesamples/google-services/tree/master/ios/gcm

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM