iPhone SDK:我需要询问用户使用GPS的权限吗? [英] iPhone SDK: Do I need to ask user for permissions to use GPS?

查看:121
本文介绍了iPhone SDK:我需要询问用户使用GPS的权限吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone应用程序中,我需要使用GPS(精确定位CoreLocation)来获取设备的当前位置。我知道大多数(如果不是全部的话)使用GPS的应用程序都有一个弹出窗口,要求用户允许GPS接入。这是由iPhone SDK自动完成还是应该自己实现这样的功能?



我试图在iPhone模拟器上运行我的应用程序,它没有要求权限所以我想知道在实际的手机上是否会发生同样的事情。



如果我自己实现了这个功能,SKD提供了这样的功能,然后我会在我的应用程序中有两个确认信息,我不想要这些信息。 解决方案

它不会被要求在iPhone模拟器的权限......它只会在iphone设备上请求用户权限......并且你不需要明确地做任何事情......它会隐式地询问......


In my iPhone application I need to use GPS (CoreLocation to be exact) to get current position of the device. I know that most (if not all) applications using GPS have a popup implemented asking the user to allow GPS access. Is that done automatically by the iPhone SDK or should I implement such functionality myself?

I've tried to run my app on iPhone Simulator and it didn't ask for permissions at all so I'm wondering if the same thing will happen on the actual phone.

And if I implement that itself and the SKD provides that out-of-the-box then I'll have two confirmation in my app which I don't want.

解决方案

It won't be ask for permission in iphone simulator... It will ask for user permission in iphone device only... and for that you do not need to do anything explicitly.. It will ask implicitly...

这篇关于iPhone SDK:我需要询问用户使用GPS的权限吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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