title: Remote notifications not working as expected
body: <p>I'm trying to get my remote notifications to work properly, but I've encountered some problems.</p>
  
  <p>I'm sending notifications from my server with the <code>content-available</code> flag set to <code>1</code>, such that my <code>didReceiveRemoteNotification</code> is being triggered, and I display the notification to the user by triggering the following method inside <code>didReceiveRemoteNotification</code>:</p>
  
  <pre><code>- (void) showPush:(NSString *)message
  {
  
    UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
  
    UNMutableNotificationContent *content = [UNMutableNotificationContent new];
    content.body = message;
    content.sound = [UNNotificationSound defaultSound];
  
    NSString *identifier = @"UYLLocalNotification";
    UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:identifier
                                                                          content:content trigger:nil];
  
    [center addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
      if (error != nil) {
        NSLog(@"Something went wrong: %@",error);
      }
    }];
  }
  </code></pre>
  
  <p>Notifications being sent while the app is in the suspended state are not displayed at all, but are displayed after the app has been opened and then closed again, like this:</p>
  
  <pre><code>-&gt; App is suspended: notification is sent
  -&gt; App is opened and in  the foreground: I can see that the notification has been processed
  -&gt; App is closed and in the background: notification is being displayed with a banner
  </code></pre>
  
  <p>Any suggestions to why this does not work as intended would be appreciated.</p>