title: Firebase Cloud Messaging APNs work only in development but not in distribution (Ad-hoc)
body: <p>I'm having a problem with getting FCM APNs to work in distribution (Ad Hoc). Everything works perfectly in development, but when I tried to build an Ad Hoc for testing, it doesn't work. Here is what I did:</p>
  <p>1- I implemented FCM into my app following this guide: <a href="https://firebase.google.com/docs/cloud-messaging/ios/client" rel="noreferrer">https://firebase.google.com/docs/cloud-messaging/ios/client</a>. I confirmed it's working with development in all three states (background, foreground, killed).</p>
  <p>2- I created a p8 key for APN and uploaded it successfully to Firebase.</p>
  <p>3- I created an Apple Distribution certificate with a provisioning profile for Ad Hoc.</p>
  <p>4- I added &quot;Push Notifications&quot; capability in Xcode</p>
  <p>5- I built the Ad Hoc distribution.</p>
  <p>6- I'm getting the notification token every time the app launches, so I'm sending my notifications to the right tokens.</p>
  <p>What I tried:</p>
  <p>1- Re-created all my certificates and provisioning files and rebuilt the app.</p>
  <p>2- I tried sending test messages from my Firebase console, and nothing was delivered</p>
  <p>3- I tried to make the app print a label whenever it gets a notification, but nothing is happening.</p>
  <p>Here is my JSON payload:</p>
  <pre><code>{&quot;aps&quot; : {
      &quot;alert&quot; : {
        &quot;title&quot; : &quot;Hello&quot;,
        &quot;body&quot; : &quot;World&quot;
      },
      &quot;content-available&quot; : 1,
      &quot;sound&quot; : &quot;default&quot;,
       &quot;badge&quot;: 1
    },
    &quot;person&quot; : &quot;John&quot;}
  </code></pre>
  <p>As I said, everything works fine during development. Am I missing something? Is there an extra step I need to do for distribution?</p>
  <p>Both development and distribution devices run on iOS 13, and I'm using Xcode 11.5</p>
  <p>UPDATE:</p>
  <p>After going through my Apple Developer account, I noticed this:
  <a href="https://i.stack.imgur.com/Cw4th.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Cw4th.png" alt="enter image description here" /></a></p>
  <p>It doesn't list Ad Hoc under distribution support, does that mean APNs don't work with Ad Hoc?</p>