title: CLLocationManager not working all the time (iOS 8, Xcode 6)
body: <p>Basically half the time the delegate method</p>
  
  <pre><code>- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations;
  </code></pre>
  
  <p>is not called at all. But the other half of the time it works perfectly! I've found that it usually happens when I first start up Xcode after closing and quitting it, but then after that or a couple runs after that it seems to work fine. I'm not 100% sure if it's just an Xcode problem or what, I'll be getting a developer's license soon so I'll see if it will work fine on an actual device.</p>
  
  <p>Starting from the viewDidAppear (tried in viewDidLoad also, made no difference), I run a method to init my locationManager stuff:</p>
  
  <pre><code>locationManager = [[CLLocationManager alloc]init];
  
  [locationManager setDelegate:self];
  locationManager.distanceFilter = 20.0f;
  locationManager.desiredAccuracy = kCLLocationAccuracyBest;
  locationManager.pausesLocationUpdatesAutomatically = NO;
  
  if ([locationManager respondsToSelector:@selector(requestAlwaysAuthorization)])
      [locationManager requestAlwaysAuthorization];
  
  [locationManager startUpdatingLocation];
  </code></pre>
  
  <p>Sometimes this works, sometimes it doesn't. I even made a timer to re-run this every so-and-so seconds, and this doesn't work.</p>
  
  <p>Is there something else I should do? Is there any answer to this problem?</p>
  
  <p>Thanks.</p>