CLLocationManager still active after app terminated [closed]
I experimented CLLocationManager that run in background by setting "Required background modes" flag in plist file and it does work, the problem is after I terminated the app (close it in task manager) the location icon (triangle on the status bar) still showing up. After I delete the app the location icon disappear. What I want to know is do I need special clean up for this kind of background location ?
The triangle doesnt mean that cllocationmanager is active. It only shows that your device's location services were requested by an app and that location services are ON (accessible) if an app wants to access. It doesnt mean that gps is still on. If your app is closed but the the battery is getting drained pretty quick, only then it means that gps is active. Even then you dont need to worry about it because some other app may be using gps.
It goes away after deleting the app because the os maintains a record of apps that requested location services within last 24 hrs and if it finds such an app then it displays the purple triangle. When you delete the app, the os cant find a record and hence the triangle goes away.
It turn out that it was a problem on iphone. After reset location warning in Settings everything work as I expected.
精彩评论