iOS-如何避免出现对话框“想使用您当前的位置" [英] iOS- How to avoid the dialog "Would like to use your current location"

查看:738
本文介绍了iOS-如何避免出现对话框“想使用您当前的位置"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用中,我的输入之一就是获取用户的位置以及用户的联系人.这是通过代码完成的.

In my app, one of my input is to get the location of the user as well as the contacts of the user. This is done from the code.

当用户首次运行该应用程序时,会出现一个对话框

When the user runs the app for the first time,they get a dialog

"AppName"想使用您的当前位置.我希望避免出现此对话框,因为这是重要数据,并且不希望用户意外按下不允许"

"AppName" would like to use your current location. I wish to avoid this dialog since this is an important data and dont want the users to accidently press "Dont Allow"

如何避免出现此对话框.任何人都可以让我知道.谢谢

How to avoid this dialog. Could any one please let me know. Thanks

推荐答案

未经用户明确许可,您无法使用位置服务或联系人.

You cant make use of location services or contacts without explicit permission from the user.

但是,您可以检查这些权限,并告诉用户需要允许这些服务才能使它们正确使用.

However, you can check for these permissions and tell the user that these services need to be allowed for them to use it properly.

尝试查看此答案以了解如何执行此操作: 检查iOS定位服务

Try looking at this answer for how to do that: Checking for iOS Location Services

这篇关于iOS-如何避免出现对话框“想使用您当前的位置"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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