Iphone Application does not ask for permission everytime - ios

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.

Related

Current location popup did not displayed in iOS 10

I am a beginner in iOS development and want to fetch user's current location, I have gone through tutorials to fetch current location.
When I run app on iPhone device, location authorization pop-up displayed and after authorize I am able to fetch current location.
Problem which I am facing is when I run app on simulator, I didn't receive authorization pop-up. While if i run same code on other's system with simulator, I received auth popup But is doesn't on my system.
I am using Xcode 8.3.1 to run app. Please help my why auth pop-up doesn't displayed on my system.
Simulators don't have permission to fetch Current Location of users due to nonavailability of GPS. Don't you worry about it. If popup appears on a Device then everything is good.

How to get user permissions every time in iOS 9

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.

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

How to reset ALAuthorizationStatusNotDetermined for photo permission on real device

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.

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