ejabberd module - Error installing mod_apns -


i trying add mod_apns ejabberd (15.10) server i've got module link,

these steps followed:

  1. i copied mod_apns.erl file ejabberd/bin folder

2.from ejabberd module installer compiled file :

./erlc -i ejabberd/include mod_apns.erl 

3. produced warnings:

mod_apns.erl:26: warning: function hexstr_to_bin/1 unused mod_apns.erl:28: warning: function hexstr_to_bin/2 unused mod_apns.erl:127: warning: variable 'from' unused mod_apns.erl:127: warning: variable 'to' unused mod_apns.erl:127: warning: variable 'type' unused mod_apns.erl:157: warning: variable 'opts' unused mod_apns.erl:164: warning: variable 'host' unused 
  1. i ignored warnings(?!) , copied .beam file ejabberd/lib/ejabberd/ebin folder
  2. i copied cert.pem , key.pem files ejabberd/conf folder (?!)
  3. i configured ejabberd.yml file follows:

code:

mod_apns:   address: "gateway.push.apple.com"   port: 2195   certfile: "cert.pem"   keyfile: "key.pem" 

i tried:

mod_apns: {} 
  1. start ejabberd

but ejabberd won't start , error file shows error: problem starting module mod_apns host..

any appreciated..

i added these lines of code mod_apns.erl , solved problem of starting module:

-ifndef(lager). -define(lager, 1). -endif. 

right after:

-export([start/2, stop/1, message/3, iq/3]). 

i created .beam file , restart ejabberd server. module installed , ejabberd server started however, still don't notifications. should question though.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -