title: How to get all events from an EKCalendar in iOS
body: <p>I've created a calendar with some events, now I want to get all events from that calendar, without knowing what their start or end date is.</p>
  
  <p>Code I tried, getting all events from all calendars, so I could divide them by calendar ID later or so.. :</p>
  
  <pre><code>NSPredicate *fetchCalendarEvents = [eventStore predicateForEventsWithStartDate:[NSDate distantPast] endDate:[NSDate distantFuture] calendars:eventStore.calendars];
  
  NSArray *allEvents = [eventStore eventsMatchingPredicate:fetchCalendarEvents];
  </code></pre>
  
  <p>This makes <code>allEvents</code> return <code>nil</code> while the database clearly shows events in the calendar.</p>
  
  <p>Anyone could help me?</p>