title: Add Event to custom calendar crashed the application
body: <p>I am trying to add an event to custom calendar.</p>
  
  <p>To fetch the calendar list I used below</p>
  
  <pre><code>EKEventStore *eventStore = [[EKEventStore alloc] init];
  [eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
     if(!granted) {
       //error alert
       return;
     }
     NSArray *calendars = [eventStore calendarsForEntityType:EKEntityTypeEvent];
     // List of all calendars
     // Let user to choose a calendar.
  }];
  </code></pre>
  
  <p>For add an event I used the below code</p>
  
  <pre><code>-(void)addEvent:(EventStoreClass *)storeObject
  {
      EKEventStore *store = [[EKEventStore alloc] init];
  
      [store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
          if (!granted) return;
  
          EKEvent *event = [EKEvent eventWithEventStore:store];
          [event setTitle:[storeObject eventTitle]];
          [event setStartDate:[storeObject eventStartDate]];
          [event setEndDate:[storeObject eventEndDate]];
          [event setCalendar:[storeObject calendar] ? [storeObject calendar] : [store defaultCalendarForNewEvents]];
          [store saveEvent:event span:EKSpanThisEvent commit:YES error:nil];
      }];
  }
  </code></pre>
  
  <p>Now when I used the default calendar it's successfully added but when I choose any other calendar the application get crashed and in log it's shows</p>
  
  <blockquote>
    <p>*** -[EKSource retain]: message sent to deallocated instance 0x7f9bddb1bf50</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/NMoj8.png" alt="enter image description here"></p>
  
  <p>I am not able to find out the exact problem or for which line this problem arise. Any advice will be appreciable.</p>