I need to respond to a LocalNotification on my app on the main viewController. My problem is that the system seems to be the catch it in didRecieveLocalNotification which I am but I then need to take some action in the main view.
My problem is that that action differs depending on a global class variable (Boolean) and from what I can tell the only way to access the viewController from the didRecieveLocalNotification is to recreate the view class as a new init alloc which would destroy the current value of said variable.
How do I call a viewController method from the appdelegate‘s didRecieveLocalNotification without destroying the variable or any content on the view.
Assuming the main viewController which you are referring to is the root view controller of your UIWindow which you should have in your app delegate, you can do the following.
From the phrasing of your question, that should call a method on the root view controller from the app delegate.