0

My application used to show under Settings->Privacy->Contacts in the simulator, until I did a Reset Contents and Settings.. on the simulator. After that I am unable to see my application mentioned in the contacts privacy tab. I cannot test contact related app functionality on the simulator. This however seems to be working on the device without issue.

I have tried restarting the Xcode, Simulator, removing derived data, clean build etc ..

This happened on 7.1 simulator, I tried resetting 7.0.1 simulator and now it has the same issue. Any suggestions/solution?

PS: I am using Xcode5.1

Popeye
  • 11,839
  • 9
  • 58
  • 91
Amar
  • 13,202
  • 7
  • 53
  • 71
  • http://stackoverflow.com/questions/20089403/xcode-5-0-2-simulator-address-book-is-empty – gro Jun 05 '14 at 12:21
  • Thanks for the link! I have contacts added to the simulator, still the app does not show up under contacts privacy tab. – Amar Jun 05 '14 at 12:45
  • 1
    After deleting the app from your sim, on first run is it asking for permission to use your contacts? – gro Jun 05 '14 at 13:24
  • No it is not. Looks like that maybe the issue. I will get to debugging. Thanks mate! – Amar Jun 05 '14 at 13:30

1 Answers1

0

Big thanks to @gro!

Actually the issue was my bad. In my code I was not making the function call where ABAddressBookRequestAccessWithCompletion gets called. Now the entry for the application under Settings->Privacy->Contacts happens only after ABAddressBookRequestAccessWithCompletion is called and the prompt to ask for permission appears (this is what I did not know).

Since I was not making a call to this function the prompt never appeared and so did the app entry under Settings->Privacy->Contacts. After fixing my code it works fine on simulator.

I mentioned in my question that this worked for device. Reason was, I was running an app to create dummy contacts in address book. Both the apps had same bundle identifier, hence my application got updated over that dummy app and used the same contacts access permissions.

Hope this helps someone with similar problem.

Amar
  • 13,202
  • 7
  • 53
  • 71