title: iOS push notification willPresent notification delegate method is not calling when app is in foreground
body: <p>I have implemented the push notification in the app. I am getting callbacks on the following delegate method whenever the push comes.</p>
  <pre><code>func application(_: UIApplication,
                   didReceiveRemoteNotification userInfo: [AnyHashable: Any],
                   fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -&gt; Void)
  </code></pre>
  <p>I have implemented the following delegate method To show the push notification when the app is in the foreground.</p>
  <pre><code>func userNotificationCenter(_ center: UNUserNotificationCenter,
                                      willPresent notification: UNNotification,
                                      withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -&gt; Void)
      { 
         completionHandler([.alert, .badge, .sound])
      }
  </code></pre>
  <p>Unfortunately, it is not working every time. Irrespective of the app state I'm getting the callback on <strong>didReceiveRemoteNotification</strong> method. Is there any particular reason for this behavior? Am I missing something?</p>
  <p>Thanks in advance</p>