iOS以编程方式撤销位置服务权限 [英] iOS revoke location services permission programmatically
问题描述
在 CLLocationManager
或 UIApplication
上是否有一个类似于功能<$ c的函数来撤消位置权限$ c> unregisterForRemoteNotifications 撤消推送通知权限?
Is there a function on CLLocationManager
or UIApplication
to revoke location permission that is similar to the function unregisterForRemoteNotifications
to revoke the push notification permission?
stopUpdatingLocation
函数CLLocation不会撤消该权限。
The stopUpdatingLocation
function on CLLocation does not revoke the permission.
推荐答案
一旦用户通过响应原始权限请求来授予(或拒绝)位置权限,对话框中,更改权限的唯一方法是用户自己使用设备设置应用程序。
Once a user has granted (or denied) location permissions by responding to the original permission request dialog, the only way that the permissions can be changed is by the user themselves using the device settings app.
即使您的应用仍具有使用权限,您也无法使用位置服务。
You can just not use location services even though your app still has permission to do so.
这篇关于iOS以编程方式撤销位置服务权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!