Я пытаюсь внедрить календарь Kal в свой собственный проект. Я скачал копию проекта github и запустил его на симуляторе. Все работает корректно и показывает данные из календаря симулятора.
Но когда я протестирую его на реальном устройстве. Он не получает данные и выдает следующую ошибку.
CalendarApp[1024:1103] Predicate call to calendar daemon failed: Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"
Вот так выглядит моя добыча.
- (void)presentingDatesFrom:(NSDate *)fromDate to:(NSDate *)toDate delegate:(id<KalDataSourceCallbacks>)delegate
{
// asynchronous callback on the main thread
[events removeAllObjects];
NSLog(@"Fetching events from EventKit between %@ and %@ on a GCD-managed background thread...", fromDate, toDate);
dispatch_async(eventStoreQueue, ^{
NSDate *fetchProfilerStart = [NSDate date];
NSPredicate *predicate = [eventStore predicateForEventsWithStartDate:fromDate endDate:toDate calendars:nil];
NSArray *matchedEvents = [eventStore eventsMatchingPredicate:predicate];
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"Fetched %d events in %f seconds", [matchedEvents count], -1.f * [fetchProfilerStart timeIntervalSinceNow]);
[events addObjectsFromArray:matchedEvents];
[delegate loadedDataSource:self];
});
Кто-нибудь может мне помочь?
С уважением и заранее спасибо