EKEventStore unable to save events

I have a feature where I need to write some events to the calendar. It's not working saying Calendar is read only. So I tried the sample app from Apple - Repeating lessions and drop in lessions from link below https://developer.apple.com/documentation/eventkit/accessing_calendar_using_eventkit_and_eventkitui

Drop in sessions which uses EKEventEditViewController works fine. But when I run Repeating lessions which requires calendar permissions it keeps saying Calendar is read only. I have hit allow on the access permissions alert and also check settings which shows app has required permissions.

can someone help why this is the case? if its a Calendar issue where do you set the modifiable permissions for it? How is EKEventEditViewController able to save events if the Calendar is readonly.

Drop in sessions which uses EKEventEditViewController works fine.

Because the event edit view controller renders its content out of process, it has full access to all the user’s calendars on the device, regardless of the access granted to the app.

<But when I run Repeating lessions which requires calendar permissions it keeps saying Calendar is read only. > The Repeating lessons app requests write-only access. What is the type of the calendar reproducing your issue?

EKEventStore unable to save events
 
 
Q