Skip to content

apns4erl v2 - expecting 410 but getting 200 #169

@monkeyfdude

Description

@monkeyfdude

I am trying to use apns4erl v2 to send notifications.

  • I sent 1 notification with app on device.
  • Device received it.
  • I deleted the app on device
  • I send notification again.
  • Expected 410, but received 200

Can you please help?

    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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions