Trying to implement iCloud Calendar synchronization for iOS. The idea is to create a new calendar from my app and sync it with iCloud when iCloud sync is on actually. To get corresponding source I'm using the following code:
EKSource* localSource=nil;
for (EKSource* source in self.eventStore.sources) { if(source.sourceType == EKSourceTypeCalDAV && [source.title isEqualToString:@"iCloud"]) { localSource = source; break; }
}
Then creating a calendar in that source and saving.
When iCloud sync is on and Calendar synchronization is on for iCloud as well from iPhone->Settings->iCloud->Calendar It's working just fine. After switching off calendar synchronization from above mentioned settings theoretically it should not allow to create calendar in that store any more. But actually even in that case it allows to get corresponding iCloud store from my application and create/save a new calendar. After creating a new calendar it's not showing it in iPhone's calendars list. But when you logging in to the iCloud web interface you can see there a lot of calendars with the same name that you have just added. The number of calendars with that name is getting more and more. Seams like there is an infinite loop problem in calendar synchronization for iCloud. So far seams like it's an iOS problem and could not find any report on that anywhere.