I want to get the list of all Islamic events of current year using Eventkit framework. Used the given below code from stackoverflow but app crashes at NSPredicate line.
-(void)showAllEvents
{
NSDate* endDate = [NSDate dateWithTimeIntervalSinceNow:[[NSDate distantFuture] timeIntervalSinceReferenceDate]];
NSArray *calendarArray1 = [NSArray arrayWithObject:calendar];
NSPredicate *fetchCalendarEvents = [eventStore predicateForEventsWithStartDate:[NSDate date] endDate:endDate calendars:calendarArray1];
NSArray *eventList = [eventStore eventsMatchingPredicate:fetchCalendarEvents];
for(int i=0; i < eventList.count; i++)
{
NSLog(@"Event Title:%@", [[eventList objectAtIndex:i] title]);
}
}