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)
}
}