How to reset ALAuthorizationStatusNotDetermined for photo permission on real device - ios

In detail,
I am making a photo function for my app, it seems that when I permit the app to access the photo once, ALAuthorizationStatusNotDetermined will no longer appear again, even I have deleted the app.
So is there any way that I can reset the app ALAuthorizationStatusNotDetermined again for debugging?

When developing on real device, reset privacy settings in
Setting, General -> Reset -> Reset Location & Privacy
Be aware that this will reset the settings for all applications at once.

Related

iOS13 automagically remembers app permissions after deleting app [duplicate]

I'm trying to recreate the condition where the following code returns AVAuthorizationStatusNotDetermined:
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
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?
Thanks for reading.
You can't reset the permission programmatically. If you want to reset the permission there are two ways:
Reset the OS
Uninstall the app and wait for a day
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.
First option
As described in Technical Note TN2265 :
You can achieve the latter without actually waiting a day by following these steps:
Delete your app from the device.
Turn the device off completely and turn it back on.
Go to Settings > General > Date & Time and set the date ahead a day or more.
Turn the device off completely again and turn it back on.
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.
Third Option
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.
This is no longer an issue if you update OS version on your device to the latest. It didnt work on 13.3.1 but it did clear permissions after 13.4.1
On iOS 14 go to Settings->Privacy->Location Services, select the app and for allow location access pick "Ask Next Time"
What worked for me:
Windows -> Devices And Simulators -> Installed Apps section
Remove the app from there using the - button.

Is it possible to reset the Face ID permission alert for an app?

The first time you try to use Face ID for an app a system permission alert prompt is shown "Do you want to allow to use Face ID" (like Photos, Contacts etc permissions). However, there appears to be no way to reset this.
I've tried deleting the app and re-installing, and even resetting Face ID on my phone. But once I re-install the app the Face ID permission is already enabled for the app in Settings -> Face ID and in Settings -> <app>, and when I attempt to use Face ID it works right away, without the permission prompt appearing.
Seems like a bug. To be clear, this is an app I'm running on my iPhone X via Xcode, not an App Store app (I don't know if that makes a difference, it shouldn't).
Using a new Bundle ID each time to test this seems a little drastic 😮
If you go into Settings > General > Reset > Reset Location & Privacy this resets the Face ID permission alert.

iPad remembering camera permissions after delete—how to clear?

I'm trying to recreate the condition where the following code returns AVAuthorizationStatusNotDetermined:
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
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?
Thanks for reading.
You can't reset the permission programmatically. If you want to reset the permission there are two ways:
Reset the OS
Uninstall the app and wait for a day
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.
First option
As described in Technical Note TN2265 :
You can achieve the latter without actually waiting a day by following these steps:
Delete your app from the device.
Turn the device off completely and turn it back on.
Go to Settings > General > Date & Time and set the date ahead a day or more.
Turn the device off completely again and turn it back on.
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.
Third Option
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.
This is no longer an issue if you update OS version on your device to the latest. It didnt work on 13.3.1 but it did clear permissions after 13.4.1
On iOS 14 go to Settings->Privacy->Location Services, select the app and for allow location access pick "Ask Next Time"
What worked for me:
Windows -> Devices And Simulators -> Installed Apps section
Remove the app from there using the - button.

Iphone Application does not ask for permission everytime

I have an ios app which uses calendar, location bluetooth and motion API. When i do a clean install to the app (remove the app completely from iPhone) and then build it using xCode, my app doesn't every time prompt to the user the consent dialog for example. This app wants to use Calendar. Do you allow it to do that.
I want to do some testing and i want this to prompt every time when user install the app after removing it from iPhone.
Any ideas?
From what I know… the system alert is prompted to the user only once!
If you delete the application from your device, the privacy settings will not be removed and will be there even if you reinstall the application. To remove them you have to manually reset the privacy settings from General-> Reset-> Reset Location & Privacy.

Is it possible to reset the privacy settings in iOS?

In order to test access granting to the iOS calendar, I need to reset the privacy settings on my test device.
However, every time I install it on the device it remembers the old privacy settings and does not show the alert view to ask me if I grant access. Deleting the app and reinstalling it does not change this fact.
Is there a way to make iOS forget it knows my app and ask me again?
Start the "Settings.app", go to General > Reset > Reset Location & Privacy.
This resets the privacy settings for all apps, but as far as I know, there is no way to reset it for a single app. Even removing the app and installing it again does not help.

Resources