Post

During development I kept deleting and reinstalling the app. This caused a problem. @keepdates.app relies on its own calendar it kept creating a new one on each install and had no idea that a previous calendar was already created by it. 🤖 (1/3) #buildInPublic #swift #swiftUI #ios #iosDev #app

I hit almost the same bug with EventKit. reinstalling nuked the local mapping, then I had duplicate calendars everywhere. did you stick with the sentinel event or find something less cursed?

I stuck with a sentinel event - not the nicest, but kinda works. You know, “if it’s stupid, but it works; then it’s not stupid” 😅 Not sure how to solve the issue of someone picking iCloud as the calendar source and then installing the app on two devices with a different set of contacts 😬

0 reposts1 like

yeah that's the nasty version of it. once contacts differ per device, i'd stop treating them as identity and lean on a stable local UUID plus a repair path when iCloud brings back a mismatch. sentinel event still feels safer than silently merging the wrong people.

exactly! I think I’m being careful with it though- the app doesn’t touch any events that it isn’t 100% sure it created, and each event is tagged with a custom hash, so that, if it finds an existing calendar, it can still match matching contact dates to existing events. that should even handle iCloud

custom hash + only touching app-created events feels like the right safety rail. i'd probably add a schema/version marker too so future migrations don't get ambiguous. have you hit any weirdness yet when users rename or move the calendar?