Why is CoreLocation (Mac OS X) not remembering my choice to allow its use? <p>I'm probably being very stupid, but I can't work out why the following is happening:</p> <p>I have an app on Mac OS X which uses CoreLocation. Below is the the relevant code:</p> <p>It asks for permission to use my location every time it launches and never remembers that I have already granted use of location data.</p> <p>The app never appears in the 'Privacy' Preference pane.</p> <p>Am I missing something?</p> <p>Thanks.</p> <pre><code>#pragma mark - General Instance Methods - (void)determineLocation { if (self.locationManager) { DDLogWarn(@"determinLocation called, but we already have a locationManager instance variable..."); DDLogWarn(@"This is a bug."); } self.currentlocationName = @"Location unknown"; if (![CLLocationManager locationServicesEnabled]) { DDLogWarn(@"Location Services not enabled."); [self fallBackToHardcodedLocation]; return; } // Location services are available. self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; // Coarse-grained location accuracy required. self.locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers; self.locationManager.distanceFilter = 1000; // meters - 1km [self.locationManager startUpdatingLocation]; } #pragma mark - Location Manager Delegate Methods - (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status { DDLogVerbose(@"Our authorisation to use the location manager has changed."); switch (status) { case kCLAuthorizationStatusNotDetermined: DDLogError(@"LocationManager Authorisation status not determined. (User hasn't chosen yet)"); break; case kCLAuthorizationStatusAuthorized: DDLogVerbose(@"We are now authorised for locationServices."); [self.locationManager startUpdatingLocation]; break; case kCLAuthorizationStatusDenied: DDLogWarn(@"LocationManager: We are now explicitly denied!"); [self.locationManager stopUpdatingLocation]; break; case kCLAuthorizationStatusRestricted: DDLogWarn(@"LocationManager We are now restricted! (not authorised - perhaps due to parental controls...)"); [self.locationManager stopUpdatingLocation]; break; default: break; } } - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { // Main callback for location discovery..§ CLLocation* location = [locations lastObject]; NSDate* eventDate = location.timestamp; NSTimeInterval howRecent = [eventDate timeIntervalSinceNow]; if (abs(howRecent) &lt; 15.0) { // Event is recent. Do something with it. if (location.horizontalAccuracy &gt; 1000) { DDLogWarn(@"Location Accuracy is worse than 1km, discarding..."); } else { [self updateLocation:location]; } return; } DDLogWarn(@"Stale location data..."); [self updateLocation:location]; } </code></pre> <p>It always asks permission: (kCLAuthorizationStatusNotDetermined appears to always be the case.)</p> <pre><code> 2015-02-07 01:03:36:127 Central Heating[2260:30b] LocationManager Authorisation status not determined. (User hasn't chosen yet) </code></pre> <p><img src="https://i.stack.imgur.com/daigk.png" alt="CoreLocation permission always asked"> (Dialog text: "Central Heating" would like to use your current location. Your location is needed for weather forecasting. [Don't allow] [OK])</p>