CLLocationManager does not stop

Dear fellow developers,

I am trying to find a solution for my problem with regarfing CLLocationManager.

I am using an instance of CLLocationManager in my application. If the user selects the Home button on the device or terminates the application, I want the search services to stop.

So I call [self.locationManager stopUpdatingLocation];- but it somehow doesn't work. The application goes into the background, and the arrow of a small place in the upper right corner of the status bar does not disappear. Even if I add [self.locationManager release]or self.locationManager.delegate = nil;- location tracking does not stop: - /

It disappears only if I go to the settings of my device and disable the location services for the application. Whenever I switch back to the location service, I immediately get a magenta colored arrow next to the toggle switch, and the icon reappears in the status bar.

My question is, how do I turn off location services when the application enters the background or terminates?

Thank you very much for a nice and pleasant day :-)

+5
source share
3 answers

You are doing it right. When entering the background, this is normal if some delegate methods are called within a few seconds. This should stop.

? , ? , , - ?

, , (, ).

+1

. "" iOS 5. : https://apple.stackexchange.com/questions/27463/why-is-the-location-services-icon-always-present

:

ios 5, " "

, , , , iOS 5 , , -.

, .

. - , Wi-Fi.

. - , .

+5

For example, if you started tracking a significant change in location, you should discard it using the appropriate pairing method. If you are using a region, enter, then, until you unsubscribe, the system will notify your delegates.

+1
source

All Articles