每次都获得当前位置的警报 [英] get alert for current location every time

查看:83
本文介绍了每次都获得当前位置的警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 CLLocationManage 获取设备的当前位置。我设置我的方法来获取按钮单击位置。我可以成功获取位置,但是当我收到带有两个消息 不允许 的消息 APPNAME想要使用您的当前位置吗?的Alertview时好。然后单击不允许。然后,每当我单击按钮时,都无法再次获得该Alertview来获取当前位置,因此无法获取该位置。那么当我单击我的按钮获取位置时,是否有可能每次都获得alertview?

I am trying to get device current location using CLLocationManage. I set my method to get location on button click. I can get location successfully but when I get alertview with message "APPNAME would like to use your current location?" with two buttons, "Dont Allow" and "Ok". and I click on "Dont Allow". Then whenever I click on button and I cant get that alertview again to get current location, so I am not able to get the location. So is it possible to get alertview everytime when I click on my button to get location?

推荐答案

当您单击 don提醒上的允许按钮,则应用程序的位置权限受到限制。

When you click on "don't allow" button on alert, Location permission for your application is restricted.

您可以导航至手机>隐私>定位服务中的设置,在那可以看到服务不适合您的应用程序。您可以打开它以授予权限

You can navigate to settings in your phone > privacy >location services, over there you can see services are off for you application. You can turn it on to give permissions

这篇关于每次都获得当前位置的警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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