How to give an iOS App running in Mac(designed for iPad) mode access to the Mac Calendars ?

My iOS app get access to Calendars on iPhone and iPad (iOS 17) bey when running on Mac (designed for iPad) the app gets the ".notDetermined" authorizationStatus after a call to EKEventStore.authorizationStatus(for: .event).

What should I do so that my App gain access to Calendars ?

After making that call does your app then show up in System Settings > Privacy & Security > Calendars?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

the app gets the ".notDetermined" authorizationStatus after a call to EKEventStore.authorizationStatus(for: .event).

The .notDetermined status indicates that the app hasn't requested calendar access to the user on that platform or if the app did, the user hasn't made a decision yet. Your app should prompt the user for authorization as mentioned when the authorization status is notdetermined.

No, it does not and I do not understand why because it does on both iPhone and iPad.

What version of Xcode did you use to build and run your app? What version of macOS are you running your app on?

From TN3152: Migrating to the latest Calendar access levels

The iOS, macOS, and watchOS SDKs bundled in Xcode 15 deprecate the requestAccess(to:completion:) and requestAccess(to:) methods. If your app links against the iOS 17 SDK, macOS 14 SDK, or watchOS 10 SDK, calling these deprecated request methods doesn’t prompt the user for access and throws an error message.

See TN3153: Adopting API changes for EventKit in iOS 17, macOS 14, and watchOS 10 for more information.

Configuration

App built on Xcode 15.2 on MacOS 14.2.1.

  • App running on iOS 17.2.1 = > OK
  • App running on MacOS 14.2.1 => NOT OK

TN3152

Fully applied. Works fine on iOS 17. Not on MacOS 14.

Code

info.plist is correctely updated (see below). I call if try await eventStore.requestFullAccessToEvents() and get a FALSE return (no error thrown). After call returned false I get EKEventStore.authorizationStatus(for: .event) == .notDetermined The user is NEVER prompted by the App for access authorization (no show).

Note

I had the same issue with Xcode 14 and running he app on MacOS 16 (in MyMac (designed for iPad) as well).

May I expect an answer ?

Can you call self.authorizationStatus = EKEventStore.authorizationStatus(for: .event) before if try await eventStore.requestFullAccessToEvents() { to determine your app's authorization status?

If the status is .notDetermined, then your app should call try await eventStore.requestFullAccessToEvents() .

Additionally, to access Calendar data, all sandboxed macOS apps must include the com.apple.security.personal-information.calendars entitlement.

To reset calendar access for your macOS app between launches, run the following command in Terminal:

tccutil reset Calendar
How to give an iOS App running in Mac(designed for iPad) mode access to the Mac Calendars ?
 
 
Q