title: Present viewController over rootViewController when a notification is tapped
body: <p>When the app is in terminate state and I receive a push notification. Which if I view I want the app to load normally but it should present a <code>viewController</code> over the <code>rootViewController</code> for which I've added a close button and whenever i will tap this button i want simply dismiss this <code>viewController</code>.</p>
  
  <p>In the method which is called when I open the app from notification I've done this:</p>
  
  <pre><code>func userNotificationCenter(_ center: UNUserNotificationCenter,
                                  didReceive response: UNNotificationResponse,
                                  withCompletionHandler completionHandler: @escaping () -&gt; Void) {
      let tabBarController = self.window!.rootViewController as! UITabBarController
      self.window?.rootViewController = tabBarController
      let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
      apptVC = storyboard.instantiateViewController(withIdentifier: "NotificationVC") as! NotificationsViewController
      window?.makeKeyAndVisible()
      window?.rootViewController?.present(apptVC, animated: true, completion: nil)
  completionHandler()
      }
  }
  </code></pre>
  
  <p>But unfortunately when I do that the app crashes. I've implemented push notification using <code>firebase</code>. I want the app to run normally like it does it's just like presenting a view controller over the root view controller on launch when user is coming from notification.</p>
  
  <p><strong>UPDATE</strong><br />here is the screenshot of my storyboard:
  <a href="https://i.stack.imgur.com/9H6K4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9H6K4.png" alt="enter image description here"></a></p>