nomad-cli / houston

Apple Push Notifications; No Dirigible Required
http://nomad-cli.com
MIT License
2.93k stars 229 forks source link

Cannot send silent notifications via CLI #172

Closed BigDada1 closed 3 years ago

BigDada1 commented 4 years ago

Hey there, I want to send silent/remote notifications via the CLI. Sending normal alert messages works fine. Sending silent notifications via Push Notification Tester works, too. I tried these commands:

$ apn push <token> -c <pem file> -P "{\"aps\" : {\"content-available\" : 1}}"

Terminal says 1 push notification sent successfully — but app does not receive the notification.

$ apn push <token> -c <pem file> -P "{\"aps\" : {\"alert\" : \"Hello\"}, \"content-available\": 1}"

Terminal says 1 push notification sent successfully — app receives only ["alert": Hello].

$ apn push <token> -c <pem file> -s ""

Terminal says missing argument: -s — the empty sound trick does not work.