title: XCode: Why is my event not being added to the calendar?
body: <p>I have added the following code to my app:</p>
  
  <pre><code>NSDate * selected = [DatePicker date];
  NSString * date = [selected description];
  
  NSDateComponents *components = [[NSCalendar currentCalendar] components:NSDayCalendarUnit 
                                                                fromDate:DatePicker.date];
  
  CalLabel1.text = [NSString stringWithFormat:@"%d", [components day]];
  
  EKEventStore *store = [[EKEventStore alloc] init];
  
  EKEvent *event = [EKEvent eventWithEventStore:store];
  event.title = @"Test Event";
  //required
  event.startDate = [DatePicker date];
  event.endDate = [DatePicker date];
  event.calendar = store.defaultCalendarForNewEvents;
  //end
  
  NSError *err;
  [store saveEvent:event span:EKSpanThisEvent error:&amp;err];
  </code></pre>
  
  <p>Why is this not adding anything to the iOS calendar?</p>
  
  <p>Thanks.</p>