2 Replies
      Latest reply on Mar 2, 2019 5:23 AM by gbrowning
      gbrowning Level 1 Level 1 (0 points)

        I've been using EventKit for years in my app (since macOS 10.10) but it's having an odd problem in Mojave.


        Previously once I received an EKEventStoreChangedNotification I could query for changed reminders with this:


        NSPredicate *predicate = [self.eventStore predicateForRemindersInCalendars:@[self.taskCalendar]];
            [self.eventStore fetchRemindersMatchingPredicate:predicate completion:^(NSArray *reminders) {
               self.allFetchedTasks = reminders;


        Worked like champ. Setting a breakpoint within that block, I could switch to Reminders, change the task title, instantly pop back in the debugger and the reminders array would have the change (via "po [reminders.firstObject title]").


        However, now in Mojave the fetch appears to return old information. I get thrown back in the debugger as soon as I change the task title in Reminders but the reminders array still contains the old info. That is, [reminders.firstObject title] is still showing the original title not the title as it exists currently in Reminders. I can continue to change the title in Reminders and each time I'm brought back into the debugger and I still see the original title.


        I also attempted to use calendarItemsWithExternalIdentifier but it also returns the original value.


        If I relaunch my app then it grabs the latest info but, again, subsequent fetches due to change notifications return the original value.


        It doesn't look like Mojave's EventKit has any new caching I can control. Is there something else I'm missing? Do I need to reconstruct my self.eventStore each time now?