title: macOS Remote Push Notifications Not Showing Alert Banner
body: <p>I'm trying to enable Push Notifications for my macOS application. Everything seems to be working. I'm able to get the device token. Send the notification without errors. Except there is no alert that shows up on my Mac.</p>
  
  <p>I added the following code to see if my application was receiving it or not.</p>
  
  <pre><code>func application(_ application: NSApplication, didReceiveRemoteNotification userInfo: [String : Any]) {
      print(userInfo)
  }
  </code></pre>
  
  <p>And after I send a notification I see the following in the console.</p>
  
  <pre><code>["aps": {
      alert = "Alert - Hello World";
      sound = "ping.aiff";
  }]
  </code></pre>
  
  <p>So it looks like it's getting to the device ok, just not showing the alert.</p>
  
  <p>I have tested the exact same setup on iOS and it's working fine and showing the alert there. So I must be missing something specifically on macOS.</p>
  
  <p>I have tried the following things to fix this:</p>
  
  <ol>
  <li>Tested with application closed and open (didn't work either time)</li>
  <li>Ensured that notifications are enabled for application in System Preferences</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/UIU5x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UIU5x.png" alt="System Preferences Image"></a></p>
  
  <ol start="3">
  <li>If I create a local notification manually in code, it works perfectly, and the notification banner appears</li>
  <li>I can not test it on older versions of macOS because the push notification API I'm using was just released in macOS Mojave</li>
  <li>I have also tried to create another test project, and the same problem happened</li>
  <li>I have ensured that Do Not Disturb is turned off, and have also checked in the notification center for the notification, but it does not display there either.</li>
  </ol>
  
  <p>How can I get it to show the banner and play the sound on macOS?</p>