Search code examples
ioseventkit

How do I check for duplicates in event calendar eventkits


I fetched a list of all events and try to match it with my current events about to be added, but it never matches and just add duplicates.

The code I used to fetch is from apple's document. Can anyone help?

http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/EventKitProgGuide/ReadingAndWritingEvents.html#//apple_ref/doc/uid/TP40004775-SW1

Code from another tutorial (I scourged the net but couldn't find how to match events. the fetch predicates results title string comparison did not work) http://neilang.com/entries/using-eventkit-in-ios/


Solution

  • I found out that one can save the eventstore event unique identifier immediately after saving. And with this identifier one can get the events back.