Blue dot doesn't appear for current location

Hi,


I have an app which was written about three years ago with a Map view that shows the current location. I'm attempting to update it to work properly with iOS 9.


I added all the necessary code to request authorization for location services. That code is working.


The problem I'm having is that my map view will not show the blue dot for the current location. The map does know what the current location is. I'm sure of this because I can access the userLocation property and see that it is set to my coordinates. I'm also getting callbacks to the didUpdateUserLocation method.


My app does override the viewForAnnotation method, but I always check to see if the annotation is one of mine or not and I return nil if it is not. (I don't think this method is even getting called for the user location anymore).


What else could be causing the loss of the blue dot?


Thanks.

It may not help, but I find that viewForAnnotation is called for the blue dot. If I use the following code with a breakpoint then it will break on the condition, even in iOS9:


if ([annotation isKindOfClass:[MKUserLocation class]])

return nil;

So you may want to put those lines at the start of your viewForAnnotation just in case some of the other logic means that it doesn't return nil for the blue dot.

Blue dot doesn't appear for current location
 
 
Q