How to send silent push to iOS via Google Cloud Messaging

前端 未结 3 2004
清酒与你
清酒与你 2021-01-04 07:05

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 d

3条回答
  •  离开以前
    2021-01-04 07:25

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

    curl -X POST --header "Content-Type:application/json" --header "Authorization:key=AIzaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" "https://android.googleapis.com/gcm/send" --data-ascii '{"data":{"xxx":"yyy"},"content_available":true,"to":"XXXXXXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY-ZZZZZZZZZZZZZZZZZZZZ"}'
    

提交回复
热议问题