Snowman
Snowman

Reputation: 32091

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?

Upvotes: 30

Views: 11295

Answers (5)

s4y
s4y

Reputation: 51735

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)

Upvotes: 3

russbishop
russbishop

Reputation: 17249

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.

Upvotes: 8

Antoine Neidecker
Antoine Neidecker

Reputation: 851

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

Settings > Privacy > Contacts

Upvotes: 0

laktak
laktak

Reputation: 60083

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

Upvotes: 44

SafeFastExpressive
SafeFastExpressive

Reputation: 3805

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.

Upvotes: 2

Related Questions