'Reset access to contacts in iOS simulator?

I want to test out the contact authorization process, but the simulator doesn't ask me for permission anymore. I've tried resetting privacy settings, I've tried resetting the simulator completely, I've tried deleting the app, but no matter what, it never asks me for permission. It just assumes I've granted it.

I'm running iOS 6 simulator. There are a couple similar questions like this on SO, but surprisingly no decent answers. Is there really no way to do this?



Solution 1:[1]

Starting with iOS 7, go to Settings, General, Reset and tap Reset Location & Privacy

Solution 2:[2]

These instructions are for Xcode 6.

  1. Find the identifier of the simulator whose access settings you want to reset in Xcode's Devices window.

  2. Delete ~/Library/Developer/CoreSimulator/Devices/<device>/data/Library/TCC/TCC.db

  3. Relaunch the simulator. (Device > Restart in the simulator menu)

Solution 3:[3]

The reset locations/privacy option ONLY works on a device. It doesn't work in the simulator.

Edit: This is no longer true, see laktak's answer.

Solution 4:[4]

Seems like this has changed. To reset permissions go to:

Settings > Privacy > Contacts

Solution 5:[5]

You can now use xcrun simctl privacy to control these settings.

Examples:

  • xcrun simctl privacy booted reset all will reset all supported permissions for all apps installed in the currently booted simulator.
  • xcrun simctl privacy booted revoke contacts com.example.my-app will deny permission for full contact access for just the given Bundle ID on the currently booted simulator.

See xcrun simctl help privacy for more details.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 shim
Solution 2 Declan McKenna
Solution 3
Solution 4 Antoine Neidecker
Solution 5 russbishop