How to send push notification using XMPP Server?

ejabberd, node.js, push-notification, xmpp, xmppframework

Solution

If you want to send push notifications with ejabberd community edition, you need to add an ejabberd module, which sends the offline messages to a specified push notification provider. This provider send the notifications to apple APNS or googles GCM. You could develop a module by self or maybe you will find some in inet. mod_zeropush (https://github.com/ZeroPush/mod_zeropush) would be one of them, but the zeropush service by self is canceled. Another one would be mod_onesignal (https://github.com/nobreak/mod_onesignal). OneSignal is a free to use Push Notification provider.

Problem

I want to develop a chat application in iphone. I'm using ejabberd xmpp server. Now i'm able to send message to other user. Now i want to receive the message with push notification. I heard that we can use xmpp servers to send push notifications. So Can anyone tell me, I want to know how Is it possible to send push notification with ejabberd Is it possible send push notifications from ejabberd xmpp server using node js. Please give any suggestion to start using notifications for messages in xmpp.

Original source