0
if  let conversationVC = storyboard.instantiateViewController(withIdentifier: "HomeViewController") as? HomeViewController {

                // set the view controller as root
                self.window?.rootViewController = conversationVC
                
}

Using this code to open view controller when app is killed and not in background. But on click of push notification banner app shows the LaunchScreen and closes automatically.

  • Check https://stackoverflow.com/a/24672592/5443937 to debug app launch by push notification. You might get the reason for the crash – Jithin Aug 13 '20 at 10:51

0 Answers0