I do not quite understand how the increase in the Badge of the ios works.
With the code that I put next I get the correct notification, but when I spend a day instead of putting, for example from 0 to 1, it happens to 2 ...
I do not understand what he left me or how he increases this value.
Can you help me out?
UILocalNotification* localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = startDate; // Por ejemplo: Ponemos el día siguiente a las 09:00 de la mañana
localNotification.soundName = UILocalNotificationDefaultSoundName;
localNotification.alertBody = @"Tiene tareas pendientes para realizar";
localNotification.alertAction = descripcionTextField.text;
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.applicationIconBadgeNumber = [[UIApplication sharedApplication] applicationIconBadgeNumber] + 1;
NSDictionary *inventory = @{
@"AcID" : [NSNumber numberWithInt: acuarioSeleccionadoID],
@"TareaID" : [NSNumber numberWithInt: tareaSeleccionada],
};
localNotification.userInfo= inventory;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];