Estoy tratando de implementar el calendar de Kal en mi propio proyecto. Descargué una copy del proyecto github y la ejecuté en el simulador. Todo funciona correctamente y muestra datos del calendar del simulador.
Pero cuando lo pruebo en un dispositivo real. No está obteniendo datos y me da el siguiente error.
CalendarApp[1024:1103] Pnetworkingicate call to calendar daemon failed: Error Domain=EKCADErrorDomain Code=1013 "The operation couldn't be completed. (EKCADErrorDomain error 1013.)"
Así es como se ve mi fetch.
- (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]; NSPnetworkingicate *pnetworkingicate = [eventStore pnetworkingicateForEventsWithStartDate:fromDate endDate:toDate calendars:nil]; NSArray *matchedEvents = [eventStore eventsMatchingPnetworkingicate:pnetworkingicate]; 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]; });
Alguien puede ayudarme?
Saludos cordiales y gracias de antemano
Ok, entonces tenía algo que ver con los permissions de los usuarios. Encontré mi respuesta aquí.
Cómo get el nombre / id del calendar pnetworkingeterminado en iOS 6