Created
December 12, 2016 02:47
-
-
Save haranicle/cd7c0aa52ef8b9b80729ae856d73f746 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# settings | |
DEVICE_TOKEN="XXXXXX" | |
TOPIC="com.your.app.bundle.id" | |
# process | |
DATE="`date \"+%Y/%m/%d %H:%M:%S\"`" | |
curl -v -d '{"aps": {"alert": {"title" : "push test" ,"body": "'"${DATE}"'"}, "sound": "default", "badge": 0, "content-available": 1} }' -H "apns-priority: 10" -H "apns-expiration: 0" -H "apns-topic: `"${TOPIC}"`" --http2 --cert privatekey.pem https://api.development.push.apple.com/3/device/"${DEVICE_TOKEN}" | |
echo "🚀 💥 📱 push_id = ${DATE}" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment