Tell me. Here comes the push notification. Clicking on it should launch the application and open the news, the number of which is stored in userInfo.

The problem is that I need to first open the screen with a tableView, and then push open the View with the news number which is in userInfo

Advise how to do it better

    1 answer 1

    in the file AppDelegate.m we change the method - application: didReceiveRemoteNotification:

    in it we give access to rootVieController as follows (((UINavigationController *) self.window.rootViewController)

    then we refer to the View that is displayed ((UINavigationController *) self.window.rootViewController) .viewControllers.firstObject

    We bring it to a class that processes the actions that occur on it and call the method in which we push to View with the news [(ClassUITableViewController ) ((UINavigationController ) self.window.rootViewController) .viewControllers.firstObject customMethodPushNotification: userInfo];