WidgetKit accessing location issue

I need to use location in my widget.

Here's what I did:

  1. Set Widget Wants Location and Privacy - Location When In Use Usage Description in my widget extension
  2. Run the widget

The problem is that every time I run the widget for the very first time, I tap "Allow" when asked to permit access to my location and then it crashes with this:

I'm really confused why this is happening, since I'm not even doing any operation that involves anything from CoreLocation.

The second time I run the widget, works great. I can access current location and do whatever I want.

At first I thought that because of my implementation of CLLocationManagerDelegate I'm getting this, but then I removed everything related to CoreLocation from my codebase except the configurations I'm talking about above.

What am I missing?

Please file a bug report and / or a Technical Support Incident and include your crash log so we can take a deeper look at the issue.

https://developer.apple.com/support/technical/

WidgetKit accessing location issue
 
 
Q