I have been playing around with EventKit recently and I added a fetch request for all Events in my calendar. But after like 20 seconds after launch, I get this error:
Fatal error: Duplicate keys of type 'EKEvent' were found in a Dictionary.
This usually means either that the type violates Hashable's requirements, or that members of such a dictionary were mutated after insertion.
2021-06-22 08:56:13.202792+0200 Assisty[1779:332215] Fatal error: Duplicate keys of type 'EKEvent' were found in a Dictionary.
This usually means either that the type violates Hashable's requirements, or that members of such a dictionary were mutated after insertion.
2021-06-22 08:57:03.745222+0200 Assisty[1779:332215] [error] precondition failure: setting value during update: 1560
I am a beginner to Xcode debugging and SwiftUI, but I can see that it thinks I have mutated something when I haven't. My app only fetches events from the user calendar and stores it in a variable of type [EKEvent]. I have no idea why this error is happening and my app is crashing left and right for no clear reason.
If any one has seen this error and knows how to fix this I would really appreciate the help.
Thanks a lot