EKEventstore and unique calendar identifier - ios

I have a question about EKCalendar's calendarIdentifier property. Is this ID unique on a global level, or on a per-source level? E.g. can I safely store the calendarIdentifier in my app to smoothly identify a calendar across all calendars in the event store (no matter what EKSource they're in) or do I also need to save the EKSource's identifier associated with the calendar?
I have a calendar selection feature in my app, and I want to safely store and load the correct calendar (within the correct account) upon app restart.
Thanks in advance.

From my personal experience and from the description of the property in EKCalendar's class reference it is local to the EKEventStore. An EKCalendar has an EKSource as it's property at the same level as the calendarIdentifier string.

Related

How do you reliably find an iOS Calendar?

The calendarIdentifier property on EKCalendar says that a full sync will lose the identifier. How are we supposed to track a calendar then? It's not possible to just trust the name of the calendar because nothing prevents the user from changing the name. Not only that, nothing prevents two calendars from having the same name.
What I'm basically dealing with is that my Team object has an associated subscribed calendar, and I need a way to link those two together. The obvious solution is to store the calendarIdentifier in the Team object once it's created, but that won't work based on the documentation.

Add Invitees to calendar event programmatically iOS

I've been trying to look for the answer to this quite some time.
Apple EventKit documentation isn't allowing changing meeting invitees programmatically since those properties in an EKEvent are read-only.
I'm trying to find a way to create a calendar meeting (not necessary using EventKit), adding invitees to the meeting and setting it programatically.
Any solution will be great,
Thanks!
As you already figured out you cannot currently write meeting fields in iOS (AFAIK EventKit is the only API giving you access to the calendar database on iOS).
If you know what kind of account it is (and get the credentials from the user), you could sidetrack EventKit and directly create meetings on the server. Eg using EWS when the account is on Exchange or CalDAV when the account is on iCloud or Apple Calendar Server etc.
And finally you always have the option to send out meeting invites via iMIP. Though you would still need to get the event into the users calendar (so that replies have a target). Depends on your useless whether this is useful.

Syncing of Calendar with iCloud lose the CalendarIdentifier

I am developing a Calendar App. In which calendars can be create by user and also need the iCloud Syncing feature so that user can get the same calendars on his/her other device. Now according to Apple Document:
A full sync with the calendar will lose this identifier. You should have a plan for dealing with a calendar whose identifier is no longer fetchable by caching its other properties.
CalendarIdentifier property of EKCalendar is not reliable. And using other properties we can not differentiate the calendar as well that it is made by iOS Native Calendar App or My Calendar App. So I am stuck here and trying to find any reliable solution. But not able to find till now so please help me for this to get the solution. I will be thankful to you.

iOS EventKit EKCalendar unique (global) identifier

Is there a property that can be used to recognize calendars across devices?
According to the Apple docs, the "calendarIdentifier" property cannot be used:
A full sync with the calendar will lose this identifier. You should have a plan for dealing with a calendar whose identifier is no longer fetch-able by caching its other properties.
I'm looking for something similar to EKEvent.calendarItemExternalIdentifier, which is the same and unique across devices, but for Calendars.

iOS: Create calendar with uneditable events?

From an app, is there a way to programmatically create a calendar with events that are uneditable? Or, what is the best way to achieve this as close as possible?
For example, Facebook events have a unique "Event Details" screen with their custom details. The user cannot edit the event from iCal, but instead have to click "View on Facebook".
1) I've explored creating local calendars and iCloud calendars but the user can easily edit the events and the calendars, including removing them, from iCal.
2) From the app, I cannot seem to create a new EKSource to have total control of the calendars I create in that source. Creating a new calendar in the existing CalDAV source also doesn't make it appear.
3) The EKCalendar class has an allowsContentModifications property, but it is readonly and cannot be modified.
Official response from Apple Developer Technical Support:
Our engineers have reviewed your request and have concluded that there
is no supported way to achieve the desired functionality given the
currently shipping system configurations.
So as of right now there isn't a way to do this.

Resources