title: Objective C, iOS 7 - CLLocationManager: didUpdateLocations is being called only once
body: <p>EDIT: Ok, I just have noticed that the problem is exclusive of iOS 7. I'm still being unable to solve it, however, so I suppouse I'll try with the sugestions bellow. Thanks to all!</p>
  
  <p>¡Hi! I'm programming a navigator app, and I need to update the user position whenever is possible. I have two View Controllers that use CLLocation manager. In both of them I've added this line:</p>
  
  <pre><code>#import &lt;CoreLocation/CoreLocation.h&gt;
  </code></pre>
  
  <p>And then added the  to the interface declaration, and I'm setting this as a property in the .h file, and synthetizing afterwards:</p>
  
  <pre><code>@property (strong, nonatomic) CLLocationManager *locationManager;
  </code></pre>
  
  <p>After that, I'm launching de locationManager in the viewDidLoad, this way:</p>
  
  <pre><code>if(self){
      locationManager = [[CLLocationManager alloc] init];
      //locationManager.delegate = self;
      [locationManager setDelegate:self];
      [locationManager setDistanceFilter:kCLHeadingFilterNone];
      [locationManager setDesiredAccuracy:kCLLocationAccuracyBestForNavigation];
      [locationManager startUpdatingLocation];
  }
  </code></pre>
  
  <p>And here are my delegate methods. </p>
  
  <p>For the first View:</p>
  
  <pre><code>#pragma mark - CLLocationManagerDelegate
  
  - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
  {
      NSLog(@"didFailWithError: %@", error);
      UIAlertView *errorAlert = [[UIAlertView alloc]
                             initWithTitle:@"Error" message:@"Failed to Get Your Location" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [errorAlert show];
  }
  
  - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
  {
      NSLog(@"didUpdateToLocation: %@", newLocation);
      CLLocation *currentLocation = newLocation;
  
      if (currentLocation != nil) {
          homeLatitude = [[NSString stringWithFormat:@"%.8f",  currentLocation.coordinate.latitude] doubleValue];
          homeLongitude = [[NSString stringWithFormat:@"%.8f", currentLocation.coordinate.longitude] doubleValue];
          NSLog(@"Updated! -&gt; hl = %f, hlg = %f", homeLatitude, homeLongitude);
      }
  }
  </code></pre>
  
  <p>For the second view. As you can see, I replaced the old didUpdateToLocation with didUpdateLocations, as a desperate try.</p>
  
  <pre><code>#pragma mark - CLLocationManagerDelegate
  
  - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
  {
      NSLog(@"didFailWithError: %@", error);
      UIAlertView *errorAlert = [[UIAlertView alloc]
                             initWithTitle:@"Error" message:@"Failed to Get Your Location"       delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [errorAlert show];
  }
  
  /*- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation   *)newLocation fromLocation:(CLLocation *)oldLocation
  {
      NSLog(@"didUpdateToLocation: %@", newLocation);
      CLLocation *currentLocation = newLocation;
  
      if (currentLocation != nil) {
          NSLog(@"Tarzan boy");
          _testLabel.text = [NSString stringWithFormat:@"Oh DAMN!!!!"];
      }
  }*/
  
  -(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations {
      NSLog(@"didUpdateToLocation: %@", [locations lastObject]);
      CLLocation *currentLocation = [locations lastObject];
      if (currentLocation != nil) {
          currentLatitude = [[NSString stringWithFormat:@"%.8f", currentLocation.coordinate.latitude] doubleValue];
          currentLongitude = [[NSString stringWithFormat:@"%.8f", currentLocation.coordinate.longitude] doubleValue];
          NSLog(@"Updated! (MapWithRoutesViewController) -&gt; hl = %f, hlg = %f", currentLatitude, currentLongitude);
          _testLabel.text = [NSString stringWithFormat:@"Update! -&gt; hl = %f, hlg = %f", currentLatitude, currentLongitude];
  
          //Aquí es donde borramos el lugar al que llegaron.
          if(mapView){
              if(followMe){
                  CLLocationCoordinate2D *c = &amp;((CLLocationCoordinate2D){.latitude = currentLatitude, .longitude = currentLongitude});
                  [mapView.mapView as_setCenterCoordinate:*c zoomLevel:32 animated:NO];
                  _ourStepper.value = [mapView.mapView as_zoomLevel];
              }
  
          if([mapView getNearestDestinyDistance:currentLocation] &lt; 150.0){
              NSLog(@"Hay que eliminar el primer destino del MapView");
              mapView.destinoActual++;
          }
  
          if([mapView getNearestPointDistance:currentLocation] &gt; 200.0){
              NSLog(@"Hay que recalcular la ruta al destinoActual");
              SpinnerView *spinner = [SpinnerView loadSpinnerIntoView:self.view];
              spinner.tag = 98;
              while (![mapView recalculateRoutesTo:currentLocation]) {
                  //do nothin...
              }
              [spinner removeSpinner];
  
          }
      }
  }
  //[locationManager stopUpdatingLocation];
  }
  </code></pre>
  
  <p>As you can see, the line</p>
  
  <pre><code>//[locationManager stopUpdatingLocation];
  </code></pre>
  
  <p>is commented. Well, the problem is driving me crazy is that the code above works as a charm in the first view controller, and update periodically as I expected. But in the second view, it works only the first time, and never updates again. I programmed these methods in different times, so I can't remember if I did something to the first view I didn't to the second. But they are in the same app, so I assume there's no problem with libraries or permissions. Any help or hint is welcome, thanks!</p>