2

I run in the situation that at least local calendars of type EKCalendarTypeLocal are listed by EKEventStore but arent't shown and can not be selected in the calendar app on iOS.

if ([eventStore respondsToSelector:@selector(calendarsForEntityType:)]) cals = [eventStore calendarsForEntityType:EKEntityTypeEvent];
else cals = eventStore.calendars;

I found out that it has probably something to do with iCloud Accessing programmatically created calendar on iOS device. I also created a local calendar successfully and could add events to it. This created calendar was not listed by EKEventStore but I get it with its identifier:

aCal = [eventStore calendarWithIdentifier:calId];

After I removed the iCloud account in the testing device all local calendars are shown also my own created. Is there any possibility to check if local calendars are hidden? So I can wrote an info text or hide them as well.

Community
  • 1
  • 1
corban
  • 618
  • 6
  • 16

1 Answers1

0

Have u solved?

Anyway, i'll try to answer.

As i understand iCloud don't let local calendars to be shown. If u turn of iCloud and then lead him back to on u will see a message like "Would u like to add your local calendar to iCloud?", so ... if the problem is just see the calendars in iCloud, extract your EKCalendar and change source in a EKSourceTypeCalDAV instead than EKSourceTypeLocal ... should be ok

Alex75
  • 527
  • 6
  • 20
  • Welcome to Stack Overflow! Could you please provide a code example? – Corey Adler Dec 21 '12 at 15:14
  • thanks for the welcome :) Please see my answer here http://stackoverflow.com/questions/13869118/ios-ekevent-store-recreating-icloud-calendars-in-a-loop-wont-save-local/13991658#13991658 – Alex75 Dec 21 '12 at 16:45