0

I'm currently developing an app where I can send push notifications to my users via parse.com. I have got the sending and receiving part working just fine but when you open the app, dosen't matter from which state, nothing happens. And also the badge doesn't go away. In my AppDelegate.m I let parse handle the push notifications like this:

- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
[PFPush handlePush:userInfo];
} 

1 Answer 1

3

Use below code which will clear the badge count to zero

- (void)applicationDidBecomeActive:(UIApplication *)application
{
  application.applicationIconBadgeNumber = 0;
}

or do following while handling push notification

-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[PFPush handlePush:userInfo];
application.applicationIconBadgeNumber = 0;
} 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.