Is it possible to access the user's location on a widget?
I used the new iOS 8 API
[locationManager requestWhenInUseAuthorization];
and I added to the info.plist file the key
NSLocationWhenInUseDescription
however, when I request the location access, an alert should appear, but it doesn't happen.
Are there some not declared limitations on iOS today extensions?
As I found out, didUpdateLocations:
delegate method doesn't work in today extension. So, to get location use locationManager.location
.
Along with requesting authorization, you must also explicitly ask your location manager to start updating locations.
[locationManager requestWhenInUseAuthorization];
[locationManager startUpdatingLocation];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With