Can an AppDelegate run a "function" in a viewcontroller on receipt of a push notification?
The application contains three tabs, the third needs to reload its webview when the application gets a push notification.
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
}
yes, you need to register your
viewController
for the particular notification, e.g in your case when you receive a remote notification, just post a custom notification and in your viewController, register this notification/listen to this notification and perform the method you want to perform.when you receive
remoteNotification
in your
viewController.m
register the viewcontroller for this notificationand next implement the selector
and finally don't forget to unregister from notification in your
dealloc
method