title: Swift: How store push notification when app is running?
body: <p>This is my <code>didReceiveRemoteNotification</code> method to handle push notifications when they are receive din my iOS app:</p>
  
  <pre><code>func showNotificationDetails(userInfo: [NSObject : AnyObject], application:UIApplication) {
      print("showNotificationDetails")
      let storyboard = UIStoryboard(name: "Main", bundle: nil)
      let notificationController = storyboard.instantiateViewControllerWithIdentifier("DynamicEventsViewController") as! DynamicEventsViewController
      notificationController.isLoadedFromNotification = true
      notificationController.eventTitle = userInfo["aps"]!["alert"] as! String
      notificationController.eventDescription = userInfo["aps"]!["message"] as! String
      notificationController.isLoadedFromNotification = true
  
      if let tabBarController = self.window?.rootViewController {
          tabBarController.presentViewController(notificationController, animated: true, completion: nil)
      }
  
      application.applicationIconBadgeNumber -= 1
      //application.cancelAllLocalNotifications()
  
  }
  
  
  func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
  
      let state:UIApplicationState = application.applicationState
      if (state == UIApplicationState.Inactive || state == UIApplicationState.Background) {
          self.showNotificationDetails(userInfo, application: application)
      }
  }
  </code></pre>
  
  <p>The problem is that if the application is running and a notification arrives, then it is not stored and it is deleted so that the user cannot see it later. How shall I proceeed in the correct way to keep notification until the user reads it?</p>