WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

SOLVED: Suggestions for identifying Calendar entries

Forums > iOS

Dear all,

do you have any suggestions how to identify a Calendar entry?

Use Case: My app should be able to add/edit entries in the Calendar app. I have no problems in adding them, my problem is how to safely remove/edit them. I need some unique identifier which my users can't edit. I digged through the documentation https://developer.apple.com/documentation/eventkit/ekevent and my understanding is that I can't set the eventIdentifier myself. Also, there is no userinfo dictionary where I can write my own data.

So do you have suggestions how I can manage to delete/edit a specific entry I have created with my app?


Hi, but you don't need to set eventIdentifier to use it right? What about saving the EKEvent and then inspecting its identifier and saving it? This way you can query the event details later.


Hi, no, I don't. But the developer documentation says that this identifier could change when Calendar is changed at a later date. I am unsure if this is reliable. But I give it a try. Thank you.


Yea, I have seen this disclaimer for EKCalendar also but in my testing, this wasn't an issue yet. It would be nice to have more robust way but this appears to be the best we got.


Save 50% in my Black Friday sale.

SAVE 50% To celebrate WWDC22, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.