I am trying to update the badge number on an app icon. My push notification is coming from the server and I know I will receive it in:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
}
My problem is, this method works only when the app is in the foreground but when my application is in the background how can I update the badge number?
I know that the applicationDidEnterBackground
method will only be called when the home button is clicked.