var _eventStore = new EKEventStore();
var ddd = _eventStore.DefaultCalendarForNewEvents;
if (ddd != null)
DefaultCalendarIdentifier = ddd.CalendarIdentifier;
endif
foreach (var calendar in calendars)
{
//find first calendar default
if (calendar.ExternalID != DefaultCalendarIdentifier)
continue;
//find first calendar we can add stuff to
if (!calendar.CanEditEvents)
continue;
ConferenceCalendarId = calendar.ExternalID;
return calendar;
}
This seems to work, but it would have been nice to have a interface that return the default calendar.
I want to get the default calendar, found s sample here:
https://github.com/xamarinhq/app-conference/blob/master/src/Conference.Clients.Portable/Services/ReminderService.cs
but this returned the first calendar with the user can modify.
Changed this:
static async Task GetOrCreateConferenceCalendarAsync()
Added:
if IOS
endif
This seems to work, but it would have been nice to have a interface that return the default calendar.