开发者

CLLocationManager still active after app terminated [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographi开发者_运维问答c area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜