Search code examples
xcode5

How to count Badge value every time in push notification when arrived?


How to count Badge value every time in push notification when arrived?

badge value increased by 1 every time


Solution

  • use this code , delegate method to check the page value

    - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
        NSDictionary *notification = [userInfo objectForKey:@"aps"];
        //notification is what you want. print it to find out the details. 
        //Title, Badge Count and all that
    }