3

I am getting the following error message when editing an existing event by presenting an instance of EKEventEditViewController:

[EventKit] Need the following entitlement in order to determine if MobileCal has location authorization required to do location predictions: com.apple.locationd.effective_bundle.

The view presents fine, and everything other than location field looks and edits fine. The location field doesn't show the "location" placeholder and it shows the clear ("x") button, even though it has nothing in it. The app crashes after entering the location and starting to type in a location search string.

All location permissions (while using and always) are requested and set in other places in the app before this, and multiple other location-based features work fine. All four Privacy - Location... strings are set in Info.plist. After the crash, the "location always" setting gets set to off, and needs to be re-enabled in settings. This is with swift in xcode 9.2.

Any ideas?

Tejas Pandya
  • 3,987
  • 1
  • 26
  • 51
OgD
  • 31
  • 3
  • 1
    What are the details of the crash? – Paulw11 Feb 03 '18 at 03:46
  • 1
    Excellent question. Said "Missing description for NSContactsUsageDescription". I add an entry for Privacy - Contacts Usage Description in info.plist and crash went away. I have no idea why it would need to ask for Contacts access, but that fixed the crash. Thanks! – OgD Feb 03 '18 at 07:16
  • The error message, and the funky looking Location field remain. But it no longer crashes and the location search actually works. – OgD Feb 03 '18 at 07:17
  • @OgD the reason why you need `NSContactsUsageDescription`, is because calendar events contain invite information which may come from the user's contacts. Also, I got `NSLocationWhenInUseUsageDescription` when editing an event's location – ErickES7 Aug 27 '18 at 04:27
  • Has this issue been resolved?? – ErickES7 Aug 27 '18 at 04:27

1 Answers1

2

There are four items you need to add to your Info.plist:

  • Privacy - Contacts Usage Description
  • Privacy - Location Usage Description
  • Privacy - Location When In Use Usage Description
  • Privacy - Calendars Usage Description
Open Info.plist
Click the `+` button
Scroll down, or begin typing the name of the key and select
Click on the field on the right side and enter your reason for requesting access
Mozahler
  • 4,958
  • 6
  • 36
  • 56