How to get only Visible calendars in iOS

124 Views Asked by At

I'm trying to get only the visible calendars from iOS using Swift. I can get the whole list of available calendars but I cannot know which one is being shown in the device. I just want to work with those ones and not creating another list of selected calendars, instead, use the list that is in the system already.

Any one knows if there is any propertie that I can get or any method? EKCalendar doesn't seem to have any useful one for that matter.

Any help would be much appreciated.

func ListCalendars() {
        if !AccesToCalendar() { return }

        self.calendarList = MyEvenstore.calendars(for: .event)

        for calendars in calendarList!{
            print(calendars.title)
        }
}
1

There are 1 best solutions below

0
Alex Ra On

I can figure out that the existing calendars on the systems are the ones configured and all of them are "visible". I'm guessing the data from the app calendar where the visbility is configured, is not accesible from another app.