title: Firebase FCM silent push notifications for iOS
body: <p>I have a problem with silent notifications on iOS.</p>
  
  <p>When my application is in background, I don't receive silent notification sent by FCM. But if I try to send directly to APNS, the notification is successfully received.</p>
  
  <p>This is the JSON sent to FCM:</p>
  
  <pre><code>{ 
  "to" : "&lt;token&gt;",
  "priority": "high",
  "content_available": true,
  "data" : {
    "&lt;key&gt;" : "&lt;string&gt;",
    "&lt;key2&gt;" : "&lt;string&gt;"
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is the JSON sent directly to APNS:</p>
  
  <pre><code>{
    "aps": {
      "content-available": 1
    },
    "&lt;key&gt;": "&lt;string&gt;",
    "&lt;key&gt;": "&lt;string&gt;"
  }
  </code></pre>
  
  <p>I have already tried to remove the "priority" key because I saw someone saying that I shouldn't set the priority if the "content_available" is already set. It didn't work.</p>
  
  <ol>
  <li>I have "Push Notifications" enabled in XCode > Capabilities.</li>
  <li>I have "Remote notifications" checked in Background Modes in XCode > Capabilities.</li>
  <li>The FCM notifications are working fine when app is in foreground and sometimes when the app is in background.</li>
  </ol>