向特定用户发送推送通知? [英] Send push notification to specific user?

查看:123
本文介绍了向特定用户发送推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个应用程序,我希望能够设置一个基本的通知(标题,消息,消息日期),并试图找出设置通知的最佳方式。我正在使用Swift 3和Firebase 3.



我不想使用本地通知,因为如果用户在多台设备上登录,我希望它到所有这些设备。

有没有办法通过FCM来做到这一点,用户可以设置一个通知,在特定的日期和时间触发,并让所有iOS设备在?



如果FCM没有这个,是否有另一个APK呢?我已经看了一下批处理,但我已经在使用Firebase。

如果您的主要用例是

解决方案

发送一个推送通知给单个用户为他的多个设备,我建议你使用 iOS上的设备组消息。根据文档,它通常用于:


通过设备组消息,应用程序服务器可以将单个消息发送到在属于一个组的设备上运行的应用程序。 通常,群组是指属于单个用户的一组不同设备。







在特定日期发送通知时,我很确定您可以在

I'm making an app where I want to be able to set a basic notification (title, message, fire date) and have been trying to figure out the best way to setup the notifications. I'm working with Swift 3 and Firebase 3.

I don't want to use local notifications because if the user is logged in on multiple devices I want it to push to all those devices.

Is there a way to do this with FCM where a user can set a notification to fire at a specific date and time and have it fire on all (iOS) devices logged in?

If FCM doesn't have this, is there another APK that does? I've looked at Batch briefly but I'm already using Firebase.

Thanks in advance!

解决方案

If your main use case is to send a push notification to a single user for his multiple devices, I suggest you make use of Device Group Messaging on iOS. As per the docs, it is typically used for:

With device group messaging, app servers can send a single message to multiple instances of an app running on devices belonging to a group. Typically, "group" refers a set of different devices that belong to a single user.


When it comes to sending the notification on a specific date, I'm pretty sure you can set it up in the Firebase Console.

However, if you intend it to be sent from the server, you have to implement it yourself, since I think, there is no currently API available or a parameter you can set in the payload that can be modified for the message to be sent for a specific date.

这篇关于向特定用户发送推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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