1

I get The operation couldn’t be completed. (kCLErrorDomain error 0.) when I run the code below. I tried to starting CLLocationManager with [self.locationManager startUpdatingLocation]; but that gives an error of startUpdatingLocation is unavailable in watchOS.

self.locationManager = [CLLocationManager new];
    self.locationManager.delegate = self;
    self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
    [self.locationManager requestWhenInUseAuthorization];
    [self.locationManager requestLocation];

- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations {

}

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {

}
pnuts
  • 58,317
  • 11
  • 87
  • 139
user1079052
  • 3,803
  • 4
  • 30
  • 55
  • Possible duplicate of [Location Manager Error : (KCLErrorDomain error 0)](http://stackoverflow.com/questions/1409141/location-manager-error-kclerrordomain-error-0) – Kosuke Ogawa Nov 17 '15 at 00:52
  • I went through all of those before I made this post. That is not the answer. – user1079052 Nov 17 '15 at 12:35

1 Answers1

1

I set my project scheme to a set default location, iwatch location on simulator to none and iphone simulator location to none. It looks like the scheme and simulator locations are fighting.

user1079052
  • 3,803
  • 4
  • 30
  • 55