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.
Related
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.
I'm working on an iOs app written in Swift with a Camera view controller. The first time I launched this view controller, the permission dialog was shown and I allowed the access to the camera and to the photo library. However, I noticed an issue while allowing the library permission and I would like to be able to reproduce it in order to fix it... But to do that, I need to re-show this permission dialog. However, even if I delete the app and reinstall it, I never get this permission dialog again.
How to get it again so I can fix my issue?
There is no perfect solution
The recommended way is go to "Settings" app
(General > Reset > Reset Location & Privacy).
But as you say, it resets all the apps.
Another option is to change the bundle identifier of the app, so it's considered a new app and it will ask again.
The third option is to delete the app, change your device time for more than 24 hours forward, turn the device off and turn it on again.
I'm not certain that it works in iOS 9, but in iOS 8 the system expired the privacy settings once the application had been uninstalled for 24 hours. You could simulate it by removing the application, moving time ahead a day in Settings and then reinstalling the application.
There's also Reset Location & Privacy, but that's a global reset.
You can go in Settings -> Privacy -> Camera and disable your app.
If you're jailbroken, you can run these shell commands on the device to reset all the permissions dialogs for just your app:
export bundleIdentifier="com.yourcompany.product"
sqlite3 /private/var/mobile/Library/TCC/TCC.db "DELETE FROM access WHERE client = '${bundleIdentifier}'"
I need my app to request notification permission again. I have tried to reinstall the app. I have also tried to reset the privacy settings (Settings > General > Reset > Reset Location and Privacy) per this post: iOS Calendar Access Permission Dialog, force it to appear?. I tried reinstalling after doing so. Nothing I have done makes any difference. It seems that this may have changed in iOS8. Is there a way to force a permission request in iOS8?
It's described in TN2265:
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.
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.
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.