title: get current address of user in xcode?
body: <p>I need to get the exact current address (country,state,city) of user. So I have gone to find latitude and longitude and then find out from it by using reverse geocoding.But unable to get latitude and longitude itself.I m using xcode 4.1  and testing in iphone simulator.</p>
  
  <p>This is the code I m working on:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      locationManager = [[CLLocationManager alloc] init];
      locationManager.distanceFilter = kCLDistanceFilterNone;
      locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; 
      [locationManager startUpdatingLocation];
      NSLog(@"%@", [self deviceLocation]);
  }
  
  - (void)locationManager:(CLLocationManager *)manager
      didUpdateToLocation:(CLLocation *)newLocation
             fromLocation:(CLLocation *)oldLocation
  {
      int degrees = newLocation.coordinate.latitude;
      double decimal = fabs(newLocation.coordinate.latitude - degrees);
      int minutes = decimal * 60;
      double seconds = decimal * 3600 - minutes * 60;
      NSString *lat = [NSString stringWithFormat:@"%d° %d' %1.4f\"", 
                       degrees, minutes, seconds];
      latLabel.text = lat;
      degrees = newLocation.coordinate.longitude;
      decimal = fabs(newLocation.coordinate.longitude - degrees);
      minutes = decimal * 60;
      seconds = decimal * 3600 - minutes * 60;
      NSString *longt = [NSString stringWithFormat:@"%d° %d' %1.4f\"", 
                         degrees, minutes, seconds];
      longLabel.text = longt;
  }
  </code></pre>
  
  <p>How can I find the latitude and longitude and thereby find the address of the user?</p>
  
  <p>EDIT:</p>
  
  <p>Updated my version to Xcode 4.5. But still couldnot see the location ....?Y is it so?</p>