You can try the local NSNotificationCenter notification to reload the table when you receive a push notification.
When a push notification is received, start the local notification. In your view controller, listen for the local notification and complete the task.
For instance:
In your didReceiveRemoteNotification:
[[NSNotificationCenter defaultCenter] postNotificationName:@"reloadTheTable" object:nil];
In your ViewController add an Observer (in viewDidLoad ):
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadTable:) name:@"reloadTheTable" object:nil];
and implement the following method:
- (void)reloadTable:(NSNotification *)notification { [yourTableView reloadData]; }
Also remove the observer in viewDidUnload or viewWillDisappear .
source share