MapView is showing my current location but no red pin (or blue circle) appears. Location services are enabled on this device. However, the red pin is shown running on simulator the same code. I already set required property:
self.mapView.showsUserLocation = YES;
I'm using custom pins, however, "mapView:viewForAnnotation:" is called only for each custom annotation, so it looks like this method is not called for current location and that's why it's not showing red pin. However, very strange why the same code runs correctly on simulator.
UPDATE Just created empty single view project with mapView. Did add self.mapView.showsUserLocation = YES but no current location is shown on device. BUT a blue circle is shown in simulator. I'm using iOS 6.1.2 on my iPhone4.
mapView:viewForAnnotation:
is called for the current location.
If the object in the annotation parameter is an instance of the MKUserLocation class, you can provide a custom view to denote the user’s location. To display the user’s location using the default system view, return nil.
In your implementation of that delegate method, check the class of the annotation that is passed in and proceed accordingly (either return nil to use the blue dot or return a custom view).
If it's not getting called, something else is afoot.