title: How to send push notification via GCM to iOS device?
body: <p>I have to catch up notification from GCM.
  I don't receive any notification when my app is in background mode. But I can see them when it is in foreground.</p>
  
  <p>for test functionality of GCM i use it:</p>
  
  <pre><code>curl -X POST -H "Authorization: key= KKKKKKKKKKKK" -H "Content-Type:    application/json" -d '{"to":"XXXXXXXXX","data":{"message": "It is special push notification for test!!!"}}' https://gcm-http.googleapis.com/gcm/send
  </code></pre>
  
  <p>I see this message (if app is active).
  but when I use it:</p>
  
  <pre><code>curl -X POST -H "Authorization: key= KKKKKKKKKKK" -H "Content-Type: application/json" -d '{"to":"XXXXXXXX","data":{"message": "It is special push notification for test!!!"},"notification":{"body":"great match!","title":"Portugal vs. Denmark","icon":"myicon"}}' https://gcm-http.googleapis.com/gcm/send
  </code></pre>
  
  <p>in this case I don't see message.</p>
  
  <p><strong>Do you know how to send notification via GCM which will show when the app is turned off?</strong></p>
  
  <p>P.S. It looks like GCM does not work with APNs.</p>