使用ejabberd xmpp向iphone发送推送通知

时间:2016-02-01 11:25:44

标签: ios ssl push-notification ejabberd

我正在使用 ejabberd xmpp 协议。需要向ios发送推送通知。我正在使用ejabberd的 mod_apns 模块。

Creating ssl connection with apns
sendpush() ->
Address = "gateway.sandbox.push.apple.com",
  Port = 2195,
  Cert = "cert.pem",
  Key = "key-noenc.pem",  
  %Options = [{cacertfile, CaCert}, {certfile, Cert}, {keyfile, Key}, {mode, binary}],
  Options = [{certfile, Cert}, {keyfile, Key}, {mode, binary}],
  Timeout = 1000,
  {ok, Socket} = ssl:connect(Address, Port, Options, Timeout),

我收到错误{选项,{模式,二进制}} 有人可以帮我创建apns ssl的连接。

0 个答案:

没有答案