应用程序终止时,位置服务不会停止 [英] Location services don't stop when application is terminated

查看:117
本文介绍了应用程序终止时,位置服务不会停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一款需要定位服务的iPhone应用程序,包括AR。

I'm currently developing an iPhone application which needs location services for various use including AR.

我在模拟器和iPhone 3GS上测试一切,一切顺利。

I test everything on simulator and on my iPhone 3GS and everything went well.

我最近在iPhone4和iPad2上进行了测试,即使手动杀死应用程序,位置服务(状态栏中的小图标)仍然显示!
禁用此图标的唯一方法是在设置中手动停止我的应用的位置服务。

I recently tested on iPhone4 and on iPad2 and the location service (the little icon in status bar) keeps displaying even when I manually kill the app! The only way to disable this icon is to manually stop the location service for my app in the settings.

有人知道这个吗?
如果需要,我可以发布我的代码。

Does anyone know something about this? If needed I can post my code.

提前谢谢

编辑:

当我终止应用程序时,转到位置服务,关闭我的应用程序,位置图标消失。但是当我重新打开它时,它会重新出现!这是正常的吗?

When I kill the application, go to location services, switch off my app the location icon disappears. But when I switch it back on, it reappears! Is that normal?

推荐答案

我找到了答案!它来自我之前启用的区域监控,但几周前删除了使用它的所有代码。

I've found the answer! It came from region monitoring, which I enabled before, but removed all code using it weeks ago.

因为我已经在iPad上测试了,即使我删除了重新安装了应用程序,系统似乎保留了我监控的区域的信息。

As I had already tested on the iPad, and even if I deleted and re-installed the app, the system seems to have kept information on region I monitored.

因此,正如文档,iOS继续找到我的应用程序,就像startMonitoringSignificantLocationChanges一样。

Thus, as described by the documentation, the iOS kept on locating for my App, just as startMonitoringSignificantLocationChanges.

感谢您的回答,它让我更好地了解了定位系统以及如何有效地使用它(特别感谢 progrmr Bill Brasky

Thanks for you answers, it gave me a better understanding of the location system and how to efficiently use it (in particular thanks to progrmr and Bill Brasky)

这篇关于应用程序终止时,位置服务不会停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆