Here is the method that I call to create a local calendar titled BART:
- (void)createCalendar
{
[self setEventStore: [[EKEventStore alloc] init]];
EKSource *local = nil;
for (EKSource *source in eventStore.sources){
if (source.sourceType == EKSourceTypeLocal){
local = source;
break;
}
}
NSSet *cals = [local calendars];
NSLog(@"%@\n",cals);
[self setBart: [EKCalendar calendarWithEventStore: eventStore]];
bart.source = local;
bart.title = @"BART";
[eventStore saveCalendar:bart commit:YES error:nil];
}
When I test run the program on my iPhone, the calendar does not appear in my iCal, but my output window in Xcode displays that a local source exists and that it contains the calendar that I created. How can I get iCal to display the calendar?