Add Push Notification to iOS Chat with Ejabberd Server

Published On: 29 August 2016.By .
  • Digital Engineering
  • Mobile

Why to Use :
Push notification helps the app to notify users regarding occurrence of any new event. Like in Chat Client, if the user is in offline mode or the app is in idle state and gets some new chat(s) then integration of push notification with chat server will make the app more user friendly and supportive. This blog describes steps of integration of push notification to iOS chat client with ejabberd server.
Pre Request :

First of all we need to download that module from git link .

https://github.com/mrDoctorWho/ejabberd_mod_apns

header_social

Implementation:

After download we need to put that file it in the ejabberd/src directory
Then run the default compiler. After running defult compiler, system generate .beam file .

Copy generated .beam files from the ebin directory.

Change in configuration file :

We need to add this code in module section:

and You need to send this stanza to the server over the XMPP connection, to let the server know your client token: Compatibility :
Module work fine with Ejabberd 14 and 15.
There is at least one known issue with Ejabberd 16 which can be solved by changing all calls to the xml module by calls to fxml. There is no support for both versions so far.
Literally, you need to change this:

Related content

That’s all for this blog