didUpdateToLocation not called when application is in background
Hi,
I am currently writing an app that will get location in both foreground and background.
My app work correctly when in foreground, however, no didUpdateToLocation callback is received when it is in background. Please help.
Below is the code I used to init. the location manager.
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
Best regards,
Wilson
|