I am trying to use apns4erl v2 to send notifications.
Headers = #{ apns_expiration => <<"0">>
, apns_priority => <<"10">>
, apns_topic => <<"com.myApp.myApp">>
},
1> apns:start().
ok
2> apns:connect(cert, my_conn).
{ok,<0.63.0>}
3> DeviceToken = <<"fddbbfcfa5ce04a07d2c053ead7b5466e3bc64362440ddb18b6aerdfb0fc8fd9">>.
<<"fddbbfcfa5ce04a07d2c053ead7b5466e3bc64362440ddb18b6aerdfb0fc8fd9">>
4> Notification = #{aps => #{alert => <<"you have a message">>}}.
#{aps => #{alert => <<"you have a message">>}}
7> apns:push_notification(my_conn, DeviceToken, Notification).
{200,
[{<<"apns-id">>,<<"637EA9C7-9B29-4A1C-D715-2C82C753BA0E">>}],
no_body}
I am trying to use apns4erl v2 to send notifications.
Can you please help?