title: Grabbing GPS Location iPhone SDK
body: <p>I am trying to grab the location of the iPhone's current location and I am not sure what I am doing wrong, nothing logs or appears....</p>
  
  <p>Code is here: </p>
  
  <pre><code>- (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];
    statusText.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];
    statusText.text = longt;
  
  
  }
  
  - (CLLocationCoordinate2D) geoCodeUsingAddress:(NSString *)address
  {
      double latitude = 0, longitude = 0;
      NSString *esc_addr =  [statusText.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
      NSString *req = [NSString stringWithFormat:@"http://maps.google.com/maps/api/geocode/json?sensor=false&amp;address=%@", esc_addr];
      NSString *result = [NSString stringWithContentsOfURL:[NSURL URLWithString:req] encoding:NSUTF8StringEncoding error:NULL];
      if (result) {
          NSScanner *scanner = [NSScanner scannerWithString:result];
          if ([scanner scanUpToString:@"\"lat\":" intoString:nil] &amp;&amp; [scanner scanString:@"\"lat\":" intoString:nil]) {
              [scanner scanDouble:&amp;latitude];
              if ([scanner scanUpToString:@"\"lng\":" intoString:nil] &amp;&amp; [scanner scanString:@"\"lng\":" intoString:nil]) {
                  [scanner scanDouble:&amp;longitude];
              }
          }
      }
      CLLocationCoordinate2D center;
      center.latitude = latitude;
      center.longitude = longitude;
      return center;
  }
  
  
  
  // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
  - (void)viewDidLoad {
      [super viewDidLoad];
    locationManager = [[CLLocationManager alloc] init];
    locationManager.delegate = self;
    locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move
    locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m
    [locationManager startUpdatingLocation];
  </code></pre>
  
  <p>In order: Grabbing the long and lat, Converting it with Google Map API and calling the locationManager first of all when the app launches.</p>
  
  <p>The coordinates appear just simply converting them to an actual location does not happen</p>