UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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?

3      

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.

4      

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.

3      

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.

4      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

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.