Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset permissions for ALAssetsLibrary in the simulator

I have an iOS app which needs to ask the user for permissions to access their photos. I am trying to enhance the user experience by displaying a prompt and explanation to the user the first time the app requests iOS for permission.

I can use [ALAssetsLibrary authorizationStatus] to get the current status (my app is targeting > iOS 6.0 only). I'm trying test the ALAuthorizationStatusNotDetermined case, but I've already granted my app access. According to another SO question, here, the device cannot reset the permissions (they are either on or off, even if the app is deleted and reinstalled).

But I am wondering if this can be done in the simulator. Can I reset the photo access permissions in the simulator? There don't seem to be any google question/answers about this? Simply deleting and reinstalling the app in the simulator does not work.

Are there any under-the-hood files we can reset? - seeing how we have access to the simulators file system, unlike the devices.

Any thoughts would be great! Thanks!

like image 338
Brett Avatar asked Dec 09 '22 17:12

Brett


1 Answers

In iOS 7 you can reset the privacy warnings in the Simulator in the same way as on the device:

 General -> Reset -> Reset Location & Privacy
like image 123
William Denniss Avatar answered Jan 05 '23 00:01

William Denniss