I'm trying to get historical data using the following syntax:
try await service.weather(for: location, including: .daily(startDate: past1, endDate: past2))
Where past1 and past2 are two dates in the past (I checked their format and they are correct).
I always get the same result, namely the 10 days default forecast you usually get calling service.weather(for: location)
Am I missing something?
Post
Replies
Boosts
Views
Activity
I need to use location in my widget.
Here's what I did:
Set Widget Wants Location and Privacy - Location When In Use Usage Description in my widget extension
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?