如何向xmpp的脱机用户发送推送通知 [英] how to send push notification to offline users of xmpp

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

问题描述

我们正在开发一个实时ios和android应用程序 为此,我们正在使用xmpp协议和openfire服务器,但现在我们面临的问题是 当用户离线时,他不会收到消息,但我们必须向他们发送诸如watsapp的推送通知,但我们确实在openfire中获得了任何选择

we are working on an real time ios and android application for that we are using xmpp protocol and openfire server but now we are facing a problem that when a user is offline he will not get message but we have to send them a push notification like watsapp but we dint get any option in openfire to do it

经过一番研究,我得到了xep-0085,并且知道如果用户离线,它可以发送推送通知

after some research i got xep-0085 and got to know that it can send push notification if user is offline

但是它不是从我必须上传苹果证书以发送推送通知的地方获得的,它可以发送没有证书的推送通知吗?

but it dint get from where i have to upload apple certificate to send push notification can it send push notification without certificate ?

任何帮助将不胜感激

推荐答案

您可以使用以下方法检查接收器是否脱机.

You can check receiver is offline or not using below method.

- (void)xmppRoom:(XMPPRoom *)sender didFetchModeratorsList:(NSArray *)items

如果您的朋友离线,则必须使用Web服务将消息/图像上传到特定服务器.当您的朋友上线时(成功连接到xmpp流之后),他必须呼叫Web服务以获取脱机消息.使用此功能,您可以轻松管理离线消息.我做到了,对我来说很好.让我知道是否有帮助.

If your friend is offline than you have to upload message/image to particular server using web service. when your friend will become online than after success connect to xmpp stream he has to call web services for get offline messages. Using this you can easily manage offline messages. I had done this and works fine for me. Let me know if any help.

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

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