如何使用 Google Cloud Messaging 将通知推送到 iOS

Posted

技术标签:

【中文标题】如何使用 Google Cloud Messaging 将通知推送到 iOS【英文标题】:How to push notifications to iOS with Google Cloud Messaging 【发布时间】:2015-03-16 13:21:08 【问题描述】:

我们已经成功地通过 GCM 在 android 上发送推送通知,但我想知道如何使用 GCM 连接到 Apple 推送通知服务?我是否需要在客户端下载一些 API,或者后端是否支持所有内容?我正在使用 Xamarin.Forms 开发前端。

【问题讨论】:

【参考方案1】:

您将不得不使用 APNS 或 PushSharp 等 3rd 方的东西

请查看以下主题。在 ios 中启用推送通知需要进行一些配置。你需要几个证书。

http://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/ios/remote_notifications_in_ios/

https://forums.xamarin.com/discussion/20845/how-to-approach-push-notifications-on-xamarin-forms-project

【讨论】:

【参考方案2】:

Google 最近推出了适用于 iOS 的 GCM。有一个可用的 Objective-C API,但是我不确定是否在任何地方都有 Xamarin 包装器。

【讨论】:

【参考方案3】:

Xamarin 终于发布了免费组件Google Cloud Messaging for iOS

here 是一个指向 nuget 包的链接。

【讨论】:

以上是关于如何使用 Google Cloud Messaging 将通知推送到 iOS的主要内容,如果未能解决你的问题,请参考以下文章