Not getting current user location
<p>in .h file</p>

<pre><code>#import &lt;MapKit/MapKit.h&gt;
@interface FirstViewController : UIViewController &lt;MKMapViewDelegate,MKReverseGeocoderDelegate,CLLocationManagerDelegate&gt;
{

}
</code></pre>

<p>in .m file</p>

<pre><code>-(void)viewDidLoad
{
    CLLocationManager *locationManager = [[[CLLocationManager alloc] init] autorelease];
    locationManager.delegate = self;
    locationManager.distanceFilter = kCLDistanceFilterNone;
    locationManager.desiredAccuracy = kCLLocationAccuracyBest;
    [locationManager startUpdatingLocation];

    [super viewDidLoad];
}


- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation 
{
     MKReverseGeocoder *geoCoder = [[MKReverseGeocoder alloc] initWithCoordinate:newLocation.coordinate];
     geoCoder.delegate = self;
     [geoCoder start];
}

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error 
{
     NSLog(@"locationManager:%@ didFailWithError:%@", manager, error);
}

- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
     MKPlacemark * myPlacemark = placemark;

     NSString *kABPersonAddressCityKey;
     NSString *city = [myPlacemark.addressDictionary objectForKey:(NSString*) kABPersonAddressCityKey];

     lblAddress.text = city;

     NSLog(@"city detail is:--&gt; %@",city);
}

- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error
{
    NSLog(@"reverseGeocoder:%@ didFailWithError:%@", geocoder, error);
}
</code></pre>

<p>This is the code which I have done to get the current location of user &amp; print it in the label.</p>

<p>But the <code>CLLocationManager</code> delegate method (which are written above) is not called &amp; I am not able to get the current address.</p>

<p>Please help me out.</p>

<p>Where I am doing mistake...? guide me.</p>

<p>Thanks.</p>
