I am using EventKit in my app and would like to find out what account a calendar belongs to.
The iPhone Calendar app shows all calendars grouped by account, with the account name for instance 'myname@me.com', or 'Gmail myname'. Where can I get those account names from?
I can get a list of EKCalendar
s from the EKEventStore
and I can get each calendars title, but I have no idea where to get the account name from. Is there an official API for this? How else would I retrieve this information? Some apps on the App Store do display the account names, so there must be a way (that also slips through the approval process...)
Thanks, Thomas
Update: Somewhere else I found references to a private property. Before I start looking for that myself, does anybody know what the name of that property is?
Elsewhere people also suggested parsing the description
(which includes the account), but that's not a very safe or elegant way, so I'd like to avoid doing that.
Update 2: I did find out that there is a private property (and its name) and it seems to work fine.