使用 Firebase 实施推送通知的最佳方式 [英] Best way to implement push notifications with Firebase

查看:39
本文介绍了使用 Firebase 实施推送通知的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名 iPhone 应用程序编码员,我使用 Firebase 作为我的后端服务器.Firebase 不支持推送通知,所以我一直在想办法将它们包含在我的应用程序中.我读过这个问题:如何使用 firebase 向特殊的在线用户发送警报消息,但这似乎更像是一种变通方法,而不是实际的解决方案.

I am an iPhone app coder, and I'm using Firebase as my backend server. Firebase doesn't support Push Notifications, so I've been trying to figure out how to include them in my app. I've read this question: How to send an alert message to a special online user with firebase but it seems like more of a work-around than an actual solution.

有没有关于如何做到这一点的答案?是否有第三方或 API 可以无缝实现此功能?

Is there an answer on how to do this? Are there third parties or APIs that might seemlessly implement this functionality?

我尝试过的一种解决方案是使用 Zapier 将 Firebase 连接到 Pushover.

One solution I have tried is to use Zapier to connect Firebase to Pushover.

此时,我已经能够在我正在编写的应用程序中观察事件,然后在我的 iphone 上的 pushover 应用程序中收到通知.但是,理想情况下,我希望在我的应用程序中接收通知,而不是在 pushover 应用程序中,因为我不希望用户需要 pushover 才能使用我的应用程序,因为我希望用户收到他们自己独特的通知,而不是针对所有人的通知.

At this point, I've been able to observe events in the app that I'm coding and then get notifications in a pushover app on my iphone. However, ideally, I'd like to receive the notifications in my app, not in the pushover app, because I don't want users to need to have pushover in order to use my app and because I want users to receive their own distinct notifications, not notifications for everyone.

有人对我应该如何处理这个问题有任何建议吗?

Does anyone have suggestions on how I should handle this issue?

感谢您的帮助!

编辑这不是这个问题的重复:Firebase 是否处理推送通知? 因为我知道 Firebase 不直接处理推送通知.我正在寻找使用 Firebase 处理推送通知的最佳间接方式.

EDIT This isn't a duplicate of this question: Does firebase handle push notifications? because I know Firebase doesn't directly handle push notifications. I'm looking for the best indirect way of handling push notifications with Firebase.

推荐答案

现在 Google 将 GCM 更名为 Firebase 云消息传递,现在提供这种跨平台服务.Firebase 还提供通知.

Now Google rebranded GCM to Firebase Cloud Messaging and it now offers this cross platform service. Firebase also offers notifications.

以下是这两种服务之间的区别:

These are the differences between these two services:

Firebase Cloud Messaging 提供了一套完整的消息传递通过其客户端 SDK 以及 HTTP 和 XMPP 服务器的功能协议.对于具有更复杂消息传递要求的部署,FCM 是正确的选择.

Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.

Firebase Notifications 是一种轻量级的无服务器消息传递解决方案建立在 Firebase 云消息传递之上.具有用户友好的图形控制台和减少的编码要求,Firebase 通知让用户轻松发送消息以重新吸引和留住用户,培养应用增长,并支持营销活动.

Firebase Notifications is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, Firebase Notifications lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.

如果您想要更详细的比较.阅读这个.

If you want a more detailed comparison. Read this.

这篇关于使用 Firebase 实施推送通知的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆