MMiroslav MMiroslav - 1 year ago 86
iOS Question

How to send silent push to iOS via Google Cloud Messaging

How to send silent push notification to iOS application over GCM?

Silent push is notification that will not appear in notification center, but awake application to do some action in background.
Google introduce new features in new GCM with possibility to send push messages to Android, Chrome and iOS.

Any idea, how to do this?

Answer Source

Use the content_available (not content-available) attribute like this:

curl -X POST --header "Content-Type:application/json" --header "Authorization:key=AIzaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" "" --data-ascii '{"data":{"xxx":"yyy"},"content_available":true,"to":"XXXXXXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY-ZZZZZZZZZZZZZZZZZZZZ"}'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download