定位服务在两部 iPhone 上的工作方式不同
所以我有这个问题 - 我有一个超级简单的应用程序,它所做的一切都是通过用户界面上的开/关按钮来跟踪您的位置。我正在 iPhone 3GS(版本 4.3)和 iPhone 4(版本 5.0 beta)上进行测试,突然在 3GS 上,当我单击“关闭”时,它不会停止 - 我仍然在状态栏上看到位置符号。
以前,它在 3GS 上运行良好 - 我可以启动、停止、发送到后台、再次启动。等等,我的关闭按钮工作得很好 - 每当我停止定位时,位置指示器就会消失。相同的代码在我的 iPhone4 上运行,没有任何问题。
我的问题是 - 有没有办法“清洁”测试 iPhone?想知道也许还剩下一些“饼干”之类的东西,我应该清理一下,这样它就能再次工作……否则,我一无所知……
谢谢!
So I have this problem - I have a super simple app that all it does it to track your location with an On/Off button on the UI. I am testing on both iPhone 3GS (version 4.3) and iPhone 4 (version 5.0 beta), and suddenly on the 3GS, when I click on Off, it doesnt stop - I still see the location symbol on the status bar.
Previously, it worked fine on the 3GS - I could start, stop, send to background, launch again. etc. and my OFF button worked perfectly - whenever I stopped location, the location indicator disappeared. The SAME code runs on my iPhone4 and no issues.
My question is - is there a way to "clean" a test iphone? Wondering maybe there are some "cookies" kinda of stuff left that I should be cleaning so it will work again...otherwise, I am clueless...
thank!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
即使应用程序在 OS 4+ 上处于后台,LocationServices 也将继续获取更新,除非您在应用程序进入后台时停止更新。请参阅各种 -stop... 方法CLLocationManager。如果没有一些您用来开始监视位置的代码,我就无法提供更多帮助,因为位置监视有很多不同的选项。
LocationServices will continue to get updates even when the App is in the background on OS 4+, unless you stop updates when the application goes into the background. See the various -stop... methods on CLLocationManager. I can't be of much more help without a bit of the code you're using to start monitoring location, since there are so many different options for location monitoring.
我也有同样的问题。要清理与位置服务相关的任何内容,请转到设置并重置位置警告。
I had this same issue. To clean anything related to location services, go to settings and reset location warnings.
我们遇到了同样的问题 - 它在 iOS 6 设备上可以正常停止,但在运行 5.1 的设备上,stopUpdatingLocation 不起作用&位置服务指示器将保留在状态栏中。奇怪的是,我们用 -
...修复了它,尽管我们只使用 [locationManager startUpdatingLocation]; 启动它
这可能是 iOS 中的一个错误 - 在修复之前我看不出我们的代码有任何问题。
We had the same issue - it would stop fine on iOS 6 devices, but on devices running 5.1, stopUpdatingLocation didn't work & the location services indicator would remain in the status bar. Bizarrely, we fixed it with -
...even though we started it using only [locationManager startUpdatingLocation];
It might have been a bug in iOS - I can't see anything wrong with our code prior to this fix.