EKEntityTypeEvent permission became EKAuthorizationStatusWriteOnly after iOS 17 update

205 Views Asked by At

I have an iOS app which displays the user's upcoming calendar events.

The app requests access to the user's calendar via (Objective-C):

self.eventStore = [[EKEventStore alloc] init];
[self.eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
    if (granted) {
        // ...
    }
}];

Subsequently, the app would check whether the user had granted calendar access via:

NSInteger authorizationStatus = [EKEventStore authorizationStatusForEntityType:EKEntityTypeEvent];

An authorizationStatus value of EKAuthorizationStatusNotDetermined would indicate that we need to prompt the user for permission. A value of EKAuthorizationStatusAuthorized would indicate that the user had already granted calendar access.

After upgrading an iPhone that had been running this app on earlier iOS versions to iOS 17, the call to [EKEventStore authorizationStatusForEntityType:EKEntityTypeEvent] started returning a new value: EKAuthorizationStatusWriteOnly. As the name implies, this value indicates that the app has "write-only" (no read access) permission on the user's calendar events.

Evidently, in iOS 17, the old EKAuthorizationStatusAuthorized response value has been split into two distinct values:

  • EKAuthorizationStatusFullAccess, indicating full access
  • EKAuthorizationStatusWriteOnly, indicating write-only access

I can see if I go into iPhone Settings > (My App) > Calendars, the app does indeed have "Add Events Only" permission.

Settings Calendars screenshot showing the Add Events Only option selected

It appears that, upon upgrade to iOS 17, the old "calendar access granted" permission had been automatically updated to the new "write-only access" permission.

While in this state, further calls to requestAccessToEntityType:EKEntityTypeEvent silently (without showing the user a prompt) return a granted value of NO.

My question: Is the most graceful action that my app could take at this point be to show a message to the user suggesting that they manually go into their device's Settings > (My App Name) > Calendar, and select "Full Access"? Is there any better way to restore the previously-granted read-write access to the user's calendar? Or is my understanding of the current situation, as detailed above, incorrect in some way?

0

There are 0 best solutions below