Question

enter image description here

  • Here in my application User set list of task to do in weekdays. So I am rescheduling each task at every Friday when user opens the app. So I want to know the list of notification which are left.
  • so What I Need Want to Predicate Timeid or weekday from "ScheduleArray".
Was it helpful?

Solution

Just use:

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"userInfo.WeekDay = %d", yourWeekDay];

or:

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"userInfo.Timeid = %d", yourTimeID];

Then:

NSArray *notifications = [[[UIApplication sharedApplication] scheduledLocalNotifications] filteredArrayUsingPredicate:predicate];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top