title: Programmatically Request Access to Contacts
body: <p>Since updating to iOS 6 I've noticed that my code to add a contact to iPhone's address book no longer works. I believe this is a permission related problem, since Apple now requires user permission before accessing contacts (fixing <a href="http://www.cultofmac.com/179733/19-of-ios-apps-access-your-address-book-without-your-permission-until-ios-6-report/" rel="noreferrer">this</a> issue).</p>
  
  <p>I expected the app to automatically ask permission to access contacts, like in the screenshot below, but it doesn't. Trying to add the contact just fails with <code>ABAddressBookErrorDomain error 1</code>. </p>
  
  <p>Do I need to programmatically launch the access to contacts request dialog? How is that done?</p>
  
  <p><img src="https://i.stack.imgur.com/MHF0p.jpg" alt="access contacts"></p>