I'm calling
[locationManager requestWhenInUseAuthorization];
on a screen that shows an MKMapView
(showsUserLocation = YES
). Which seems weird in the first place (Apple should handle this for MKMapView
automatically, but XCode was complaining when I didn't do it).
So I get the alert view that says the application wants to use your location, but then the alert view disappears on its own.
Why does the alert view disappear on its own?
Only thing I can think of is that I am calling requestWhenInUseAuthorization
in the initWithCoder
method. I'm only doing that because I think I saw the Xcode complaint when calling it from viewDidLoad.