Skip to content

Instantly share code, notes, and snippets.

@unnamedd
Forked from greencoder/apns.sh
Last active October 28, 2020 10:12
Show Gist options
  • Save unnamedd/f1c3d82e4731f30027145255035934d4 to your computer and use it in GitHub Desktop.
Save unnamedd/f1c3d82e4731f30027145255035934d4 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>
# To generate .pem from .p12
openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts
@unnamedd
Copy link
Author

Hi @cuongkjm, to be really honest? I have no clue how can I help. Sorry 😔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment