How to get user permissions every time in iOS 9 - ios

I am doing application related to camera,photos and GPS.Whenever i open the app i need to ask the permissions to user on every installation.This is working fine in iOS 10.But in iOS 9,if i uninstall and install again,permission popups are not coming,but in iOS 10 it's working correctly.Please suggest how to get the popups every installation in iOS 9 also.

This issue will appear if in your "info.plist" file contains "CFBundleDisplayName" with empty string value. Just enter your app name there. Also if that is not working try to reset the settings by below 3 way,
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
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.

With iOS 9 it will take around 2 days to remove the permission from OS. Within 2 days if you install that app again which you installed previously and accepted permissions previously then it will not ask for the permission again. If the install is after 2 days then it will ask for permission.
If you want it to give a try then you can check it after increasing the date with 2-3 days then install application. Then it will definitely ask for the permission.

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.

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.

iOS Calendar Access Permission Dialog, force it to appear?

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