Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing events in "Events Found in Mail" calendar

I'm trying to access events that are created automatically from emails with the new proactive assistant feature found in iOS 9. The events are displayed in the "Events Found in Mail" Calendar.

To access these I am doing the following

self.eventStore.requestAccessToEntityType(.Event, completion: { (granted, error) -> Void in

    let predicate = eventStore.predicateForEventsWithStartDate(NSDate(timeIntervalSince1970: timestamp1), endDate: NSDate(timeIntervalSince1970: timestamp2), calendars: nil)
    let events = eventStore.eventsMatchingPredicate(predicate)

}

However the events in this calendar are not listed. Is this a limitation from Apple or can I access them in any other way?

enter image description here

like image 566
Nilsymbol Avatar asked Oct 16 '15 08:10

Nilsymbol


1 Answers

I was able to ask this question to an apple engineer and their answer is that they do not expose this calendar for privacy reasons. They want an user to add an event parsed from mail to one of their normal calendars to confirm they want to expose it to other apps and that is why this calendar is not visible when doing usual

 let calendars = store.calendarsForEntityType(EKEntityTypeEvent)
like image 165
66o Avatar answered Oct 04 '22 12:10

66o