“X想要使用您当前的位置”背后的规则是什么?在iPhone上? [英] What are the rules behind "X would like to use your current location" on the iPhone?

查看:289
本文介绍了“X想要使用您当前的位置”背后的规则是什么?在iPhone上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iPhone上使用位置感知会触发X想要使用您当前的位置 - 不允许/确定。在 CLLocationManager 文档,声明:

Using location-awareness on the iPhone triggers the "X would like to use your current location" - "Don't allow"/"OK". In the CLLocationManager documentation, it is stated:

用户可以选择拒绝应用程序访问位置服务数据。核心位置框架由应用程序初始使用,提示用户确认使用位置服务是可接受的。如果用户拒绝请求,CLLocationManager对象会在将来的请求中向其委托报告相应的错误。

"The user has the option of denying an application’s access to the location service data. During its initial uses by an application, the Core Location framework prompts the user to confirm that using the location service is acceptable. If the user denies the request, the CLLocationManager object reports an appropriate error to its delegate during future requests."

如果您点击确定以允许位置服务,我发现初始使用是两次。从第三次开始,iPhone将记住您将来使用该应用程序的设置。

I found the "initial uses" to be two times if you hit "OK" to allow location services. From the third time on, the iPhone will remember your setting for all future uses of the application.

然而,按下不允许的用户将不断被打扰每次应用程序的一部分尝试使用位置服务。我已经在我自己的应用程序中尝试了至少15次,并且在2010年温哥华 - 官方移动观众指南中更多地点击了不允许。对于不想使用此功能的用户来说,这非常烦人。

However, a user pressing "Don't allow" will constantly be bothered every time a part of the application tries to uses location services. I've tried at least 15 times in my own app, and have tapped "Don't allow" even more in the "Vancouver 2010 - official mobile spectator guide". This is extremely annoying for users not wanting to use this feature.

我的问题:


  • 对于所有应用程序,iPhone会询问两次如果点击确定,请记住设置。这是正确的观察吗?

  • 如果您点击不允许,iPhone会继续询问的次数是否有限制,或者这是否永远不会被记住?你怎么处理这个?由于locationManager:didFailWithError:被通知,我想它每次都可以增加一个计数器属性并坚持这一点。下次使用该应用程序时,将在我自己的代码中检查此设置。如果计数器> = 2,请不要使用核心位置。

  • 我记得删除确定设置的唯一方法是将其重置为常规中的所有应用程序 - >重置 - >位置警告。有没有办法只为一个应用程序或我自己的代码执行此操作?

推荐答案


  1. 是的,它会一直问你两次。有点古怪和不直观的imho。这是我的理解,这是因为你第一次按错了按钮。之后,它会假设您知道自己想要什么。

  1. Yes, it will always ask you twice. Kind of weird and unintuitive imho. It's my understanding that this is in case you hit the wrong button the first time. After that it assumes you know what you wanted.

我在LocateMe示例中找到了以下内容:

I found the following in the LocateMe example:

两次连续的应用程序启动时不允许与说永不允许相同。
但我也读到其他人看到的行为与你相同。最近的操作系统更新可能有变化?无论如何,你的方法听起来很合理。

"Don't Allow" on two successive app launches is the same as saying "never allow". but I've also read that other folks are seeing the same behavior that you are. Maybe a change in recent OS update? Anyways, your approach sounds reasonable.


  • 我不相信你只能重置一个应用程序,抱歉。

  • I don't believe that you can reset for only one app, sorry.

    这篇关于“X想要使用您当前的位置”背后的规则是什么?在iPhone上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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