比如现在角标是3,我点击进去然后回到主屏幕角标没了,然而再次收到消息后,角标确实累加之前的3,变成4,依次累加;
我也已经按照下面的方法写了,还是不行,我使用你们官方demo,进行验证,发现你们demo也是这样的,角标会累加;
- (void)applicationDidBecomeActive:(UIApplication *)application {
NSInteger num = application.applicationIconBadgeNumber;
if(num!=0){
AVInstallation *currentInstallation = [AVInstallation defaultInstallation];
[currentInstallation setBadge:0];
[currentInstallation saveEventually];
application.applicationIconBadgeNumber=0;
}
}