Reputation: 5442
I want to show the user what are the calendars they synced and using in their iPhone or iPad. I spent more time to searched result for my question. But, i can't get the correct solution for my question. Can you please tell me to retrieve the synced calendars from iPhone app? That means if the user synced Google calendar my app should show the list of the calendar in their iPhone device. Thanks in advance. Please help me.
Upvotes: 2
Views: 308
Reputation: 5442
Thanks to all. I have found the solution for my question. I used EKCalendar to retrieve all the calendars from EKEventStore. Here is my code,
NSArray *caleandarsArray = [[NSArray alloc] init];
caleandarsArray = [[eventStore calendars] retain];
// NSLog(@"Calendars from Array : %@", caleandarsArray);
for (EKCalendar *CalendarEK in caleandarsArray)
{
NSLog(@"Calendar Title : %@", CalendarEK.title);
}
This is working fine for me. It is showing all the calendars from iOS device. Thanks.
Upvotes: 1