小编Phi*_*her的帖子

使用Firebase实施推送通知的最佳方式

我是一个iPhone应用程序编码器,我使用Firebase作为我的后端服务器.Firebase不支持推送通知,所以我一直在试图弄清楚如何将它们包含在我的应用中.我已经读过这个问题:如何向一个使用firebase的特殊在线用户发送警报消息,但它看起来更像是一个解决方案,而不是一个实际的解决方案.

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

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

此时,我已经能够在应用程序中观察我正在编码的事件,然后在我的iphone上的pushover应用程序中收到通知.但是,理想情况下,我希望在我的应用中收到通知,而不是在pushover应用中,因为我不希望用户需要进行推送才能使用我的应用,因为我希望用户能够收到他们自己的通知,而不是每个人的通知.

有没有人对如何处理这个问题有任何建议?

谢谢您的帮助!

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

push-notification ios firebase zapier pushover

12
推荐指数
2
解决办法
2万
查看次数

你如何阻止Firebase上的用户?

我正在为我的应用使用Firebase,并想知道如何阻止某些用户.我在控制台的Auth选项卡上看到,有"删除"和"禁用"选项.这些怎么办?我无法找到相关文档.其中一个允许我阻止用户吗?

阻止用户的意思是".read": "auth != null"规则阻止他访问数据库上的数据

firebase firebase-security firebase-authentication

2
推荐指数
1
解决办法
5453
查看次数

使用Firebase,Node.js和Google Cloud Messaging for iOS应用推送通知

我正在尝试使用Firebase,Node.js和Google Cloud Messaging来发送iOS应用的推送通知.下面是Node.js代码

var Firebase = require('firebase'),
    gcm = require('node-gcm')
    ;
var pushRef = new Firebase("https://<myapp>.firebaseio.com/ios/queue/tasks");

pushRef.on("child_added", function(snapshot) {

    console.log("child added event registers");

    var notificationData = snapshot.val();
    sendNotification(notificationData);
    snapshot.ref().remove();

});

function sendNotification(notificationData) {

    var message = new gcm.Message({
      notification: {
        title: "Title",
        body: notificationData.message
      }
    });

    var sender = new gcm.Sender(<my Google Server Key>);
    var registrationTokens = [notificationData.recipientId];

    console.log("about to send message");
    console.log("this is the registration token: " + registrationTokens);

    sender.send(message, { registrationTokens: registrationTokens }, 10, function (err, response) { …
Run Code Online (Sandbox Code Playgroud)

push-notification node.js firebase google-cloud-messaging

0
推荐指数
1
解决办法
5945
查看次数