Skip to content

Instantly share code, notes, and snippets.

@greencoder
Created May 11, 2016 17:04
Show Gist options
  • Select an option

  • Save greencoder/16d1f8d7b0fed5b49cf64312ce2b72cc to your computer and use it in GitHub Desktop.

Select an option

Save greencoder/16d1f8d7b0fed5b49cf64312ce2b72cc to your computer and use it in GitHub Desktop.

Revisions

  1. greencoder created this gist May 11, 2016.
    9 changes: 9 additions & 0 deletions apns.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # 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>