Resetting iOS 7 microphone access permission - ios

How do I reset the microphone access permission so that the app will ask for microphone access permission again as if it were downloaded fresh from the App Store?
Reinstalling the app does not accomplish what I need. When I set the permissions in Settings->Privacy->Microphone, I can only turn permissions on or off. I need to reset it so that it asks for permissions again.

You can RESET your privacy settings in iOS Settings.
Settings > General > Reset > Reset Location and Privacy.
NOTE: Privacy settings for all apps will be reset.

At least starting from iOs 7.1.1 there are switches to change access permission for every single app.
Look in: Settings->Privacy, select the kind of subsytem of your interest ( eg: microphone ), you will see your app in the list. Change the value of the selector according to your needs.
Have a nice day, Stefano

If you change your bundle identifier, that'll also reset the permissions for your app.

Permissions for an uninstalled app are reset after a day.
So, if it is not urgent, you can wait for it reset. I know this is not an ideal solution but it is app specific

Following on from Stefano's post - if you'd like to direct your user directly to the microphone settings then you can use:
let app = UIApplication.sharedApplication()
app.openURL(NSURL(string:"prefs:root=Privacy&path=MICROPHONE")!)
(at least on iOS 9 - if the Settings app structure changes, then the link will likely need to change)

Related

Remove a setting from the settings screen in iOS on app upgrade

My app initially used a feature that required microphone access. So the settings screen used to show the toggle switch for toggling that permission on or off. In the new version we no longer need that feature. So I removed the entry for microphone from the Root.plist in the Settings.bundle. This works for new installations. But for a user updating the app, the settings still shows the microphone permission. Is there any way to remove that entry ?
I believe you need to delete the NSMicrophoneUsageDescription key from your info.plist file. I guess that as long as iOS sees that key, it will render the corresponding entry in your app's settings.
You can read more about what this key does here.

Camera and Photos permission - iOS [duplicate]

In my iOS app I am accessing the user's photo gallery. The first time the user does this, it asks them for permission. Some of my users have reported getting a crash this first time due to the permission request, but it works fine on subsequent tries.
To be able to test this on my own, I need to be able remove the permission from my iPad and have it prompt again. Is there a way to do this either through the iPad/iPhone itself or through code?
Run the Settings app. Go to General, then Reset. Tap on Reset Location & Privacy. This will reset all of your location and privacy settings, not just for your test app. But you are doing this on a development device so that should be OK. This works in the Simulator too.
In iOS 7+, you can go into Settings > Privacy > Photos and explicitly enable or disable access for individual apps.
This is much better than resetting your entire device privacy settings!
Another way is to temporary change Bundle Identifier (CFBundleIdentifier) in Info.plist.
System will treat such app as a new separate app and will display "would like to access your Photos" alert.
Don't forget to revert CFBundleIdentifier after you end testing.

How to clear iOS LocationUsage preference from device for testing purposes?

I have an iOS application that requests the user to allow or deny location access for the application.
From what I have read online, these preferences reset automatically every 24 hours. And an alternative would be to test on multiple devices.
Is there any way to clear these preferences manually before I re-run the application in the simulator?
You can reset your location preferences, by following below steps:
1) From your Home screen, go to Settings > General > Reset
2) Select Reset Location & Privacy
Note: This will reset your location warnings for all sites and applications.

Reset Permissions like Camera for iOS Apps?

When I develop an app for iOS (iPhone/ iPad) and I need to request permissions. When I use the camera I need to request the camera permission. This can only be done once.
Is there a way to reset initial given permissions at least when I develop an app?
In this way I could check different scenarios for requesting the initial app permissions.
Note: I want to get the initial permission request popup message again.
Settings > General > Reset > Reset Location & Privacy.
This will reset all location, camera and microphone permissions.
It cannot be done on a per app basis.
Another way around this is to change your bundle id. With each new bundle id you provide, it is like a fresh install of the app. Remember to change it back to the original bundle id after testing :)
To reset all the Location & Privacy permissions you can go to:
Settings > General > Reset > Reset Location & Privacy
To view what Apps have what services and to turn it off for individual services you can go to:
Settings > Privacy > The service you want to view
Here you can turn off the service for individual apps, note that this doesn't mean you'll get the popup message again it just means that app will not use that service.
What worked for me:
Windows -> Devices And Simulators -> Installed Apps section, remove the app from there using the - button.
This resets the permissions every time with a fresh install afterwards.
If testing on a real device, uninstalling the app seems to work for me.
Another way to reset permissions on iOS simulator is to delete the appropriate database row from the access table in $SIMULATOR_DEVICE_DIRECTORY/data/Library/TCC/TCC.db. This can be done per app / service basis.

iOS 8 - Changing permissions manually

I am developing an application for iOS 8.1.2 and i make requirement permission to CLLocationManager, but if the user does not accept permission and go to panel settings and try to change the privacy settings, the settings close at the time of selection (like a crash) and if user return in the settings panel , it is still selected the "Never" option.
Problem: As much as you try to change this permission it will never change. It happens to the application in the background or completely inactive.
My Problem not in code to get location and not in code to request information. Is in the change permission of my
application on device.

Resources