title: curl sent Firebase Cloud Messaging alert not visibly appearing on iOS device
body: <p>I am trying to get Firebase Cloud Messaging iOS alerts sent from my server to FCM to appear on my iOS device.</p>
  
  <p>If I send the message from the FCM console:</p>
  
  <p><a href="https://console.firebase.google.com/project/___your-awesome-project___/notification">https://console.firebase.google.com/project/<strong><em>your-awesome-project</em></strong>/notification</a></p>
  
  <p>and the FCM sample app:</p>
  
  <p><a href="https://github.com/firebase/quickstart-ios">https://github.com/firebase/quickstart-ios</a></p>
  
  <p>is closed or in the background, the alerts show up beautifully, </p>
  
  <p>and if it's in the foreground I see this in the iOS console:</p>
  
  <pre><code>{
      aps =     {
          alert = "HEY YO";
      };
      "gcm.message_id" = "0:123456789_blah_blah";
      "gcm.n.e" = 1;
      "google.c.a.c_id" = 123XXXXXXXX789;
      "google.c.a.e" = 1;
      "google.c.a.ts" = 123XXX789;
      "google.c.a.udt" = 0;
  }
  </code></pre>
  
  <p>...but if I try this:</p>
  
  <pre><code>curl -X POST 
  --header "Authorization: key=&lt;server key&gt;" 
  --header "Content-Type: application/json" 
  https://fcm.googleapis.com/fcm/send
  -d "{\"to\":\"&lt;device registration id&gt;\",\"notification\":{\"body\": \"HEY YO\"}}"
  </code></pre>
  
  <p>...it never shows up as an alert, no matter if the FCM sample app is in the foreground, background, or completely closed.</p>
  
  <p>It does however show up in the iOS console but with fewer parameters:</p>
  
  <pre><code>{
      aps =     {
          alert = "HEY YO";
      };
      "gcm.message_id" = "0:123456789_blah_blah";
  }
  </code></pre>
  
  <p><strong>Is it possible to use curl to fire off Firebase Cloud Messaging notifications that appear as alerts on my iOS device?</strong></p>
  
  <p><strong>ANSWER</strong> [thanx 2 Arthur!]<strong>:</strong></p>
  
  <p>Just add: <code>\"priority\":\"high\"</code></p>
  
  <p>Like so:</p>
  
  <pre><code>curl -X POST 
  --header "Authorization: key=&lt;server key&gt;" 
  --header "Content-Type: application/json" 
  https://fcm.googleapis.com/fcm/send
  -d "{\"to\":\"&lt;device registration id&gt;\",\"priority\":\"high\",\"notification\":{\"body\": \"HEY YO\"}}"
  </code></pre>
  
  <p>...and I see a beautiful alert notification!!!</p>