I using below code for LocalNotification for every day.
NSDate * datetime = reminder.fireTime;
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *components = [cal components:(NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond)fromDate:datetime];
components.timeZone = [NSTimeZone defaultTimeZone];
UNCalendarNotificationTrigger *triggerCalender =
[UNCalendarNotificationTrigger triggerWithDateMatchingComponents:components
repeats:YES];
UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
content.title = NOTIFICATION_REMINDER_TITLES;
content.body = NOTIFICATION_REMINDER_MESSAGES;
UNNotificationRequest *request =
[UNNotificationRequest requestWithIdentifier:[NSString stringWithFormat:FORMAT_KEY_NOTIFICATION, REMINDER_TITLES[type]]
content:content
trigger:triggerCalender];
It's working fine apart from 1 condition. When scheduled time is 1-day ahead.
Example: - Current time (7:00 AM) Now I am trying to schedule notification from tomorrow onward at 7:30 AM. So local notification should start from tomorrow onward (This is my requirement).
But its schedule for today as well as. So I want to ignore today notification. How can I achieve this?