Previously I am using UILocalNotification for reminder purpose in my application.
But as above API is deprecated in iOS 10.0 now need to use UserNotifications Framework's UNNotificationRequest.
Using UILocalNotification i was able to set fire date as well as repeat interval as below:
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
NSDate *tomorrow = [NSDate dateWithTimeInterval:(24*60*60) sinceDate:[NSDate date]];
localNotification.fireDate = tomorrow;
if(repeatUnit!=0){
localNotification.repeatInterval = NSWeekCalendarUnit;
}
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
In above code I'm able to set tomorrows date when notification will get fire and also i was setting repeat interval of 1 week which is going to be started from fire date.
How this could be achieved using UserNotifications Framework's UNNotificationRequest.
Because in new api we can use either of trigger UNCalendarNotificationTrigger and UNTimeintervalNotificationTrigger to initiate UNNotificationRequest.
Is any way available so set both just like UILocalNotification does?