calendarItemExternalIdentifier
is available as soon as you save (with commit) a calendar item. But, there are situations when the calendarItemExternalIdentifier
is later changed, when the calendar item is synced further to the server (e.g. if it's an event from an Exchange account).
All the other identifiers are not shared between devices (this includes identifiers for sources and calendars), so the best option is sticking with calendarItemExternalIdentifier
.
A full sync with a calendar can occur when the user sets up a new source (e.g. the user removes and adds the same Exchange account). There may also be different situations that cause a full calendar sync.
calendarIdentifier
is a local identifier, so it won't be of much use in your case (except if you want to create a workaround for the issue with calendarItemExternalIdentifier
changing).
As mentioned earlier, the calendar and source identifiers are not global, so it would be near impossible to know if "Foo" calendar is setup on a different device, or if the "Foo" calendar is the same "Foo" calendar from your other device.
Usually, if you find your Action object on the new device, you can assume that the calendar that it belongs to is the same as the calendar from the different device.
One way to go about it, when updating your Action objects, would be to save the changes (as usual) to the server. Each of the devices (including the one that made the change) would then search for the corresponding calendar item, and update it if it's found.
I'm currently doing something similar, and this is probably what I'll end up doing.
A better alternative (probably more time consuming as well) would be to have the server connect and sync with the external sources (CalDav, Exchange etc.).