iPad记住相机权限后删除 - 如何清除? [英] iPad remembering camera permissions after delete—how to clear?

查看:582
本文介绍了iPad记住相机权限后删除 - 如何清除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图重新创建以下代码返回 AVAuthorizationStatusNotDetermined 的条件:

I'm trying to recreate the condition where the following code returns AVAuthorizationStatusNotDetermined:

AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];

但是,iPad似乎记住了相机权限,即使应用程序被删除和重新安装后,每次都返回授权或未授权。任何想法如何重置权限,以便返回NotDetermin?

However, the iPad appears to remember camera permissions even after the app is deleted and reinstalled, and so either Authorized or NotAuthorized is returned every time. Any idea how to reset the permissions so that NotDetermined is returned?

感谢阅读。

推荐答案

您无法以编程方式重置权限。如果您要重置权限,有两种方法:

You can't reset the permission programmatically. If you want to reset the permission there are two ways:


  1. 重置操作系统

  2. 卸载app并等待一天

我知道这两个选项对开发人员来说都没有帮助,如果他们试图测试

I know both of those options are really not helpful for a developer, if they are trying to test it out something.

有三种方法可以测试应用程式的第一个执行情况,而不必重设整个作业系统或等待一天。

There are three alternatives for testing your app's first run scenario without resetting the entire OS or waiting a day.

技术说明TN2265


后者实际上不会按照以下步骤等待一天:

You can achieve the latter without actually waiting a day by following these steps:


  • 从设备中删除您的应用。

  • 完全关闭设备,然后重新打开。

  • 依次转到设置>常规>日期&时间和设置日期提前一天或更多。


$ b $ b

第二个选项



当您删除应用程式时,iOS会将您应用程式的权限对应至应用程式的Bundle ID,日数据。

Second option

When you delete an app the iOS keeps the permission of your app mapped to your app's bundle id, it keeps the data for day. So you can also change your app's bundle id to test it out.

如@rmaddy在评论中建议,您可以重置所有位置和隐私权限:设置 - >常规 - >重置 - >重置位置&隐私。
请注意,这会为该设备上的所有应用重置所有位置和隐私权限。

As suggested by @rmaddy in the comment you can reset all location and privacy permissions : Settings -> General -> Reset -> Reset Location & Privacy. Note that this will reset all location and privacy permissions for all the apps on that device.

这篇关于iPad记住相机权限后删除 - 如何清除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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