Getting User Location to work in iOS8
03 Oct 2014 | Xamarin.iOSSo the quick fix is to do the following:
1. In your info.plist file add one of the following key/value pairs:
2. I then have a Extensions.cs where I keep my various extensions, for this case I've just made a couple of checks to whether the selectors are available on the platform, so the code won't crash on previous versions of iOS.
3. Remove your previous call to mapView.ShowsUserLocation and do the following instead:
Now you respond to the AuthorizationChanged Event and set the ShosUserLocation flag accordingly.
Edit (3/10/2014 17:00):
Now that I have had the chance to play a bit more with it, I have a couple of observations that might help you. First don't let go of the CLLocationManager instance, i.e. have it as a class field otherwise the dialog will disappear pretty quickly and it won't let you get location updates.
I didn't mention that you will have to do some checks on what iOS version you run at now and only call this code when on iOS 8 and higher, to do this you can do something as follows.