title: Send push Notification with FCM on IOS
body: <p>I try to send push notification to my Cordova Ios App.</p>
  
  <p>I use the plugin <a href="https://github.com/fechanique/cordova-plugin-fcm" rel="nofollow noreferrer">cordova-plugin-fcm</a> </p>
  
  <p>For my android app it's work perfectly , the problem is for Ios , my curl request return :</p>
  
  <blockquote>
    <p>InvalidApnsCredential</p>
  </blockquote>
  
  <p>I have upload my Apns key on FCM and this key work because i've try to send a push notification with just Apns  and it's work fine my app receive the notification.</p>
  
  <p>Here the APNS script who work  : <a href="http://thrysoee.dk/apns/" rel="nofollow noreferrer">http://thrysoee.dk/apns/</a></p>
  
  <p>Here my php curl Script with FCM wich work with android but not Ios : </p>
  
  <pre><code>    $pushUrl    = "FCM_PUSH_URL"; //https://fcm.googleapis.com/fcm/send
      $key        = "SERVER_KEY";//Server key get in FCM console
      $ch         = curl_init($pushUrl);
      $headers    = [];
  
      $headers[] = 'Content-Type: application/json';
      $headers[] = 'Authorization:key=' . $key;
      $data  = array(
          "notification" =&gt; array(
              "title"         =&gt; "Bonjour le monde !",
              "body"          =&gt; "Notif de test",
              //"click_action"  =&gt;"FCM_PLUGIN_ACTIVITY",
              "icon"          =&gt; "fcm_push_icon",
          ),
          "data" =&gt; array(
            'msg'     =&gt; 'hello',
            'msg2'    =&gt; 'world'
          ),
          "to"        =&gt; "MY_IOS_REGISTER_TOKEN"//token get on my ipad with the getToken method of cordova plugin,
          "priority" =&gt; "high",
      );
  
      $json_data = json_encode($data);
  
      curl_setopt($ch,CURLOPT_HTTPHEADER, $headers);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
      $res = curl_exec($ch);
      curl_close($ch);
  
      echo "&lt;pre&gt;" . print_r($res,true) . "&lt;/pre&gt;"; exit;//{"multicast_id":xxxx,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidApnsCredential"}]}
  </code></pre>
  
  <p>Thanks you. </p>