codedge-llc / pigeon

iOS and Android push notifications for Elixir
https://hex.pm/packages/pigeon
MIT License
645 stars 145 forks source link

FCM - 2.0.0.RC3 add ability to set APNS #276

Open grahac opened 1 month ago

grahac commented 1 month ago

Is your feature request related to a problem? Please describe. FCM has a apns payload where you can directly set the iOS badge. Would like to be able to update badges remotely.

Describe the solution you'd like Add set_apns method that sets the apns payload.

grahac commented 1 month ago

Instead of adding a setter let's just add a comment to the readme. Something like.

apns = %{
            "payload" => %{
              "aps" => %{"badge" => 12, "sound" => "default"}
            }

notification
|> Map.put(:apns, apns)