#import <EventKit/EventKit.h>
I cannot create an event in the default iOS calendar.
EKEventStore *eventStore = [[EKEventStore alloc] init]; for (EKSource *source in eventStore.sources) { if (source.sourceType == EKSourceTypeCalDAV || source.sourceType == EKSourceTypeLocal) { NSLog(@"I found it"); break; } }
From that moment on, he was unable to return any sources. When I create and run the application, there are no requests to provide access to the default calendar.
In general, I get an empty array:
[eventStore.sources count]
Even when I try to add an event without creating a new calendar (using
[eventStore defaultCalendarForNewEvents]
source share