notification.userInfo in storeChanged(_:)

In the storeChanged callback function for the notification that the event store has changed, I was able to retrieve an nsarray with information like "x-apple-eventkit:///Task/p1133". How do I use that information to disover which events or reminders were changed. I found documentation that said to cast the event to an NSManagedObject class, but that doesn't work when I try to do that with a reminder. The cast always fails.

Replies

Apple's documentation of EKEventStoreChanged says:


Posted whenever changes are made to the Calendar database, including adding, removing, and changing events or reminders. Individual changes are not described. When you receive this notification, you should refetch all

EKEvent
and
EKReminder
objects you have accessed, as they are considered stale.