title: Predicate call to calendar daemon failed: Error Domain=EKCADErrorDomain Code=1013
body: <p>Predicate call to calendar daemon failed: Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"</p>
  
  <p>I am trying to fetch reminders from default app.</p>
  
  <pre><code>if([eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) {
          // need user permission for iOS 6 and later
          [eventStore requestAccessToEntityType:EKEntityTypeReminder completion:^(BOOL granted, NSError *error) {
              if (granted) {
                  //---- codes here when user allow your app to access theirs' calendar.
                  [self performCalendarActivity:eventStore];
              }
              else {
                  //----- codes here when user NOT allow your app to access the calendar.
              }
          }];
      }
  </code></pre>
  
  <p>---- Fetching the reminder for the date-----</p>
  
  <pre><code>-(void)performCalendarActivity:(EKEventStore*)evtStore
  {
      self.eventsList = [[NSMutableArray alloc] initWithArray:0];
      int seconds_in_day = 60*60*24;// 1 day = 60*60*24 seconds = 86400 seconds
      NSDate *endDate = [startDate dateByAddingTimeInterval:seconds_in_day];
  
      // use Dictionary for remove duplicates produced by events covered more one year segment
      NSMutableDictionary *eventsDict = [NSMutableDictionary dictionaryWithCapacity:1024];
      NSDate* currentStart = [NSDate dateWithTimeInterval:0 sinceDate:startDate];
      NSDate* currentFinish = [NSDate dateWithTimeInterval:seconds_in_day sinceDate:currentStart];
  
      if ([currentFinish compare:endDate] == NSOrderedDescending) {
          currentFinish = [NSDate dateWithTimeInterval:0 sinceDate:endDate];
      }
      NSMutableArray *events = [NSMutableArray arrayWithObjects: nil];
  
      NSArray *calendars = [eventStore
                            calendarsForEntityType:EKEntityTypeReminder];
  
      NSPredicate *predicate = [eventStore predicateForRemindersInCalendars:calendars];
     //NSPredicate *predicate = [eventStore predicateForIncompleteRemindersWithDueDateStarting:startDate ending:currentFinish calendars:calendars];
      [eventStore fetchRemindersMatchingPredicate:predicate completion:^(NSArray *ekReminders){
          [events addObjectsFromArray:ekReminders];
      }];
  }
  </code></pre>
  
  <p>I am getting this error:-
   Predicate call to calendar daemon failed: Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"</p>
  
  <p>Please help.</p>