Reset permissions for ALAssetsLibrary in the simulator

I have an iOS application that should ask the user for permission to access their photos. I am trying to improve the user interface by displaying a prompt and explanation to the user the first time the application asks iOS for permission.

I can use [ALAssetsLibrary authorizationStatus] to get the current status (only my app targets> iOS 6.0 ). I am trying to test the ALAuthorizationStatusNotDetermined case, but I have already granted access to my application. According to another SO request here , the device cannot reset permissions (they are turned on or off, even if the application is uninstalled and reinstalled).

But I wonder if this can be done in the simulator. Can I reset permissions to access photos in the simulator? . You seem to have no questions or answers on Google? Simple removal and reinstallation of the application in the simulator does not work.

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

Any thoughts would be great! Thanks!

+4
source share
2 answers

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

  General -> Reset -> Reset Location & Privacy 
+9
source

According to iOS 6.0 release notes :

IOS Simulator does not display privacy alerts for apps that access Photos, Contacts, Calendar, and reminders.

Thus, you cannot test the invitation requesting access to photos on Simulator in general, you need to test it on the device. On the device, you can reset the privacy settings in the Settings application (General> reset> reset Location and privacy).

+5
source

All Articles