title: App crashed in iOS 6 when user changes Contacts access permissions
body: <p>I have an app that uses the Address Book. When running in iOS 6 it runs this code when the user does something that requires Address Book access.</p>
  
  <pre><code>if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined)
  {
      ABAddressBookRef addressBookRef = ABAddressBookCreateWithOptions(NULL, NULL);
  
      ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef error)
      {
          if (granted)
          {
              showContactChooser();
          }
      });
  
      CFRelease(addressBookRef);
  }
  else if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized)
  {
      showContactChooser();
  }
  else
  {
      showAccessDeniedAlert();
  }
  </code></pre>
  
  <p>This works perfectly: I am able to read the contacts information and when the user denied access, the app reacts accordingly. </p>
  
  <p>However, if the user:</p>
  
  <ol>
  <li>Allows Contacts access in the app,</li>
  <li>Quits the app,</li>
  <li>Goes to Settings->Privacy->Contacts and disables Contacts access for the app,</li>
  <li>Runs the app,</li>
  <li>While the app is running in background goes to settings and enables Contact access for the app,</li>
  </ol>
  
  <p>the app immediately crashes inside <code>main()</code> with no exception information or a meaningful stack trace. I tried turning on the "all exceptions" and <code>[NSException raise]</code> breakpoint, but that didn't give me any more information.</p>
  
  <p>The crash can be reproduced even if the app doesn't run the above code during the launch.</p>
  
  <p>What's happening here? Is there a callback that I should be subscribing to?</p>