Let's say I have to write an application that must sync with one of the calendars available on the device. Let's assume that I have "Action" objects that have a start date, end date, recurrence etc.
Device A: I create "Action" objects and then sync them using EventKit with my iCloud calendar named "Foo". I get some unique identifiers that I have to link them with my "Action" objects in order to know which one to update/delete in the future. Then I sync my "Action" objects with my own server.
Device B: I get the "Action" objects from the server. I modify them. I have to update the calendar items. What happens if I don't have the "Foo" calendar set on Device B? What happens if I do have it?
I guess I need to use the calendarItemExternalIdentifier
and not the calendarItemIdentifier
property in order to identify events uniquely across devices that use the same calendar, right?
Is that calendarItemExternalIdentifier
given in the moment of creation of the calendarItem? or is it given by the iCloud server? Do I need internet connection for this to work?
The documentation for the calendarIdentifier
property states:
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.
What does a full sync even mean?