OgD
OgD

Reputation: 31

EventKit: error when an instance of EKEventEditViewController presented, then a crash after location edit

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?

Upvotes: 3

Views: 587

Answers (1)

Mozahler
Mozahler

Reputation: 5303

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

Upvotes: 2

Related Questions