EKEventStore requests access to Contacts when initialized (macOS)

Number:rdar://FB8918491 Date Originated:Nov 26, 2020
Status:Open Resolved:
Product:EventKit (macOS) Product Version:
Classification:Bug / Unexpected Behavior Reproducible:100%
If a project has enabled entitlements for Contacts and Calendar access, as soon as EKEventStore is created, Contacts permission request dialog appears (for first time). Steps to reproduce:

1. Create simple macOS application
2. Enable Contacts and Calendar in Hardened Runtime Section (ensure to provide "Privacy - Contacts Usage Description" in Info.plist)
3. Add one line anywhere in the app (e.g. in ViewController’s viewDidLoad): “EKEventStore()”
4. Run application
5. Observe that Contacts permission request dialog appears.

Expected behavior: No dialog should appear until actual access to contacts is requested.

Why is this a problem: This leads to bad UX because user doesn’t initiate this flow. One could still use Calendar integration, but not Contacts.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!