Access is not requested again after reinstalling the app in iOS12 - ios

After updating to iOS12 and testing the apps build in Xcode 9, we found out that after deleting and reinstalling the app - the user is not prompt again with a question regarding access to the Camera or Gallery.
On iOS11, every time the app is installed, iOS asks for permission.
I tested few random apps from AppStore to see how they behave and the conclution is - some of them do reset the access and some don't. So, I'm completely lost.
Also, as an info, but I'm not 100% sure about this: when there is a time period between deleting and installing the app (more than 1h), even on iOS 12 is asking for permission.
Is there any change there in iOS 12? Do you have any clue how to keep iOS 11 behaviour instead?
Thanks!

The only certain way to test the authorization request process again after deleting your app is (and always has been) to go to the Settings app and choose General -> Reset -> Reset Location & Privacy. This is a major pain because you've now reset all your location and privacy settings.
My other suggestion (and it's only a suggestion) is that you try restarting the device after deletion of the app. Maybe, just maybe, this will cause the device to write something out to disk that will cause it to forget about its previous authorization of this app.

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.

Show permissions dialog again in iOS

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}'"

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.

not able to delete my ios app (completely)

I am trying to delete my app from my device. But there's some problem.
Actually am using a AvAudiorecorder, in which, when thje recording code is executed the device asks to allow/disallow the microphone(from ios OS). The problem is am doing some testing for that app. when I choose an option from them, the app doesnt prompt the allow/disallow options again , even after deleting the app from the device.
i.e. when i reinstall, the settings under microphone automatically shows his name. but which is not the case when I run on the VERY first time on device.
I read how to delete app from ios simulator and device, they are not working.
Please Help.
In your device's settings. Go to General - Reset - Reset Location & Privacy
I had the inverse problem; I had an issue in my app where the unnecessary use of AVAudioSessionCategoryPlayAndRecord was set causing unnecessary microphone usage prompting, settings, etc. My app update got rejected so I fixed the app to set only AVAudioSessionCategoryPlayback but I kept seeing the old state in settings->privacy->microphone until I followed this answer.
Interestingly, my app has been again rejected post fixing so I suspect that the app review team have not performed this important reset of the test environment.

How to test iOS 7 microphone privacy code (privacy setting cannot be removed from device) [duplicate]

I've written an app that requests access to the iPad's calendar. Under iOS 6, a system dialog appears that asks the user if that's okay.
Problem is, I can't replicate that situation once it's happened. For testing purposes, I want to force that dialog to come up consistently. Instead, the OS caches previous settings and doesn't bring up the dialog again. This is still the case even if I delete the app off the iPad and re-install. (Changing the app name and bundle fixes the problem, but I don't want to do that every time I test.)
Does anyone know how to force this to appear?
Thanks.
Settings > General > Reset > Reset Location and Privacy
You can Reset Location and Privacy as suggested by Greg Maletic but if you do not want to reset all your apps, you can just change the bundle identifier of your app.
On iOS 9 and later version,uninstall and install the app,access permission dialog will appeared.
But iOS 8 will remember what you choose.
On iOS 10.2.1:
I simply uninstall and reinstall the app again, the permission dialog appeared again.

Resources