Skip to content

Instantly share code, notes, and snippets.

@ergoz
Forked from greencoder/apns.sh
Created October 25, 2017 10:08
Show Gist options
  • Select an option

  • Save ergoz/05b8ac83a8b168f855fe004a0714eaa4 to your computer and use it in GitHub Desktop.

Select an option

Save ergoz/05b8ac83a8b168f855fe004a0714eaa4 to your computer and use it in GitHub Desktop.
Curl the APNS http/2 API
# Note: You MUST have curl 7.47+ with http/2 support compiled in
curl -v \
-d '{"aps":{"alert":"<message>","badge":42}}' \
-H "apns-topic: <bundle id>" \
-H "apns-priority: 10" \
--http2 \
--cert <certificate file> \
https://api.development.push.apple.com/3/device/<device token>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment