问题描述
在我的 iPhone 应用程序中,我需要使用 GPS(确切地说是 CoreLocation)来获取设备的当前位置.我知道大多数(如果不是全部)使用 GPS 的应用程序都有一个弹出窗口,要求用户允许 GPS 访问.这是由 iPhone SDK 自动完成的,还是我应该自己实现这些功能?
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?
我尝试在 iPhone 模拟器上运行我的应用,但它根本没有请求权限,所以我想知道在实际手机上是否会发生同样的事情.
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.
如果我自己实现它并且 SKD 提供了开箱即用的功能,那么我将在我的应用程序中得到两个我不想要的确认信息.
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.
推荐答案
它不会在 iphone 模拟器中请求权限... 它只会在 iphone 设备中请求用户权限... 而你不需要需要明确地做任何事情..它会隐含地问......
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 的权限吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!