0

My locationManager is setup to work in BG (allowsBackgroundLocationUpdates + in capability Background Modes: location updates is checked).

My CLLocationManagerDelegate's

- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations

works fine when application is in BG.

But,

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

Does not get called when in the application is in BG. When the application is returned to FG then the method is called.

  • I checked this on iOS 10.

Any ideas?

Paulw11
  • 108,386
  • 14
  • 159
  • 186
dardi
  • 39
  • 4
  • To get the delegate didFailWithError to be called I switch location services off. – dardi Oct 30 '16 at 21:43
  • Sounds reasonable. Location updates are delivered in the background. Failure isn't a location update, it is location service status update. – Paulw11 Oct 30 '16 at 21:47

0 Answers0