title: iOS8: Blue bar "is Using Your Location" appears shortly after exiting app
body: <p>I would like to get the blue bar when tracking in the background, but not when not.</p>
  
  <p>My app uses location services all the time when active, so in iOS8 I use the <code>requestWhenInUseAuthorization</code> on <code>CLLocationManager</code>. Normally, the app stops tracking your location when you close it, but the user can choose the option to let the app track his location in the background as well. Therefore, I have the <code>location</code> option for <code>UIBackgroundModes</code> in the Info.plist file. That works perfectly: when switching to the background, the app keeps getting location updates, and a blue bar appears as a reminder that the app is using location services. All perfect.</p>
  
  <p>But the problem is, that the blue bar appears also when the user has not chosen to track in the background. In that case I simply stop location updates from the AppDelegate when entering the background:</p>
  
  <pre><code>- (void) applicationDidEnterBackground:(UIApplication *)application
  {
      if (!trackingInBackground) {
          [theLocationManager stopUpdatingLocation];
      }
  }
  </code></pre>
  
  <p>The Blue bar is shown only for a second after closing the app, but it still looks pretty irritating.</p>
  
  <p>I know that using <code>requestAlwaysAuthorization</code> instead of <code>requestWhenInUseAuthorization</code> will solve the issue, but then I will not get any blue bar at all, also not when tracking in the background is actually on.</p>
  
  <p>I have tried to <code>stopUpdatingLocation</code> already in the <code>applicationWillResignActive:</code> method, but that makes no difference.</p>
  
  <p>Does anybody know how to get the blue bar when tracking in the background, but not when not?</p>