0

I have an app which is using CLLocationManager in background and in foreground Mapkit to show the users location. I have no BackgroundModes activated. So if my app goes in background I stop show user Location with [mapview setShowsUserLocation:NO]. And in appDelegate I start LocationManager and stop it every 30s with [locationManager startUpdatingLocation] and [locationManager stopUpdatingLocation] (no worries about battery drain in this moment) to get the user location in Background. So lets say the locationManager is 5seconds on and 25seconds off. This 25 seconds the location services indicator should be away, right? But it isn't. Even if I didn't tell the LocationManager to Start the indicator is there all the time. Killing the app doesn't help, only to turn location services off in the settings. But if I turn it back on then the indicator will be there again all the time.

I tried everything in different posts even in these: Locationservice Indicator stays "on" Location services don't stop when application is terminated

And I'll never call locationManager=nil or release it. So crazy.. can everybody help me pls?


Update: So this drives me really crazy. Stuck on this since couple of days. And only tested it on my real iPhone. Now I tried it with iPad and iPhone Simulator and on both devices it is as I expected to be: 5 seconds the indicator is on and 25 seconds the indicator is away, when app is in background. So is it a bug on my real phone or do anybody have some suggestions? I have 5.1.1 on it and a jailbreak but this should not affect it!?

Thanks for any help :)

Community
  • 1
  • 1
mojo
  • 1
  • 3
  • are there other things that can cause this Location Indicator when app is in background? because I searched my whole Project for other LocationManagers but I only use it in AppDelegate. Have no more ideas where the fault is :-( – mojo Aug 08 '12 at 06:01
  • Nobody? Problem still exists! have no other device at the moment to test it only my iPhone... – mojo Aug 14 '12 at 04:28

1 Answers1

0

Ok I just figured it out. This Post helped me.

"From your iOS Settings select General | Reset | Reset Location Warnings. This will reset the warning to all the apps. This mean that the next time you start an app that requires location, the iOS will prompt you with the location permission dialog. Select 'Reset Warnings' from the action sheet."

I called this a few times and afterwards it was working as I expected (and as it worket in Simulator all the time) :-)! Now I can think about draining the battery etc...

Community
  • 1
  • 1
mojo
  • 1
  • 3