iOS - Send push notification on XMPP chat app when buddy is offline
Asked Answered
B

1

6

I have an iOS chat app like Whatsapp. The chat is running well with XMPP protocol. The app has other functionalities, and has an APNS service running well with them. For the client I'm working with XMPPFramework, and for the server with PHP and Tigase for the XMPP server.

The question is this:

How to make the server send a push notification to an user, when the XMPP server receives a message for him and his presence is false?

Thanks!

Barograph answered 6/11, 2012 at 12:50 Comment(0)
M
5

The best example would be AMP implementation in the Tigase. It is based on a MessageAmp plugin and AMP component.
The MessageAmp plugin intercepts messages. If it detects that the user is not logged in, it forwards the message to AMP component to store it in an offline storage. In your case, you could have your own Message plugin which, if it detects that the user is offline, could forward the message to your Push component (iOS push or Android push, SMS push or something else).
And all the logic responsible for actual pushing notification to the device should be implemented in that component.

Musselman answered 6/11, 2012 at 19:22 Comment(3)
Hi Amrg, could you implement this? How complex is this implementation.. the plugin to forward the message to push component? I want to do pretty much same thing, can you tell me where to start??Riebling
@amrg , Artur can you suggest something on this question pls, thanks #16097520Riebling
We can use amp plugin in php ?Horripilate

© 2022 - 2024 — McMap. All rights reserved.