fraxool
fraxool

Reputation: 3229

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?

Upvotes: 2

Views: 2272

Answers (4)

John Coates
John Coates

Reputation: 116

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

Upvotes: 0

jcesarmobile
jcesarmobile

Reputation: 53361

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.

Upvotes: 6

Nicholas Smith
Nicholas Smith

Reputation: 11764

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.

Upvotes: 2

David P
David P

Reputation: 1043

You can go in Settings -> Privacy -> Camera and disable your app.

Upvotes: 0

Related Questions