-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
I want to get the default calendar, found s sample here:
but this returned the first calendar with the user can modify.
Changed this:
static async Task GetOrCreateConferenceCalendarAsync()
Added:
string DefaultCalendarIdentifier = "";
#if IOS
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.
Reactions are currently unavailable