title: How to handle push notification payload without tapping it when the app is in not running or background state
body: <p>I have to locally store Title and Body of all the notifications coming in my iOS app and display those in a notifications screen. I'm able to store all the notification tapped by using these-</p>
  
  <p>This gets called when the app is in not running state or killed when the push notification is tapped-</p>
  
  <pre><code>    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -&gt; Void) {...}
  </code></pre>
  
  <p>This gets called when app is running in foreground or background and push notification is tapped-</p>
  
  <pre><code>    func userNotificationCenter(_ center: UNUserNotificationCenter,
                              didReceive response: UNNotificationResponse,
                              withCompletionHandler completionHandler: @escaping () -&gt; Void) {...}
  </code></pre>
  
  <p>My question is how to store notifications without tapping on notifications.
  I want to store the notifications even if the notification is dimissed/cleared by user.</p>
  
  <p>I know this method is called when app is active and in the foreground and push notification comes-</p>
  
  <pre><code>func userNotificationCenter(_ center: UNUserNotificationCenter,
                              willPresent notification: UNNotification,
                              withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -&gt; Void) {..}
  </code></pre>
  
  <p>How to handle push notification data without tapping on it when the app is in background or not running state? </p>