How to programmatically access the default alert time for calendar events?

In the latest versions of iOS, users can choose the default warning time that will be used for all newly created events (by going to Settings --> Mail, Contacts, Calendars --> Calendars / Default Alert Times , see http: //www.imore .com / how-edit-calendar-defaults-alerts-and-sync-settings-iphone-and-ipad # calendar-alerts ).

I am looking through the EventKit documentation and cannot find a way to read this parameter programmatically. I tried to create a dummy event using [EKEvent eventWithEventStore:] and reading its alarms property, but it doesn't seem to set a default alarm until I save the event. Of course, I could save the event, read its alarms property, and then delete it right away, but this seems like an ugly solution.

What is the correct way to access this parameter from code?

+4
source share

Source: https://habr.com/ru/post/1490400/


All Articles