2

From Apple's release notes:

As of Seed 4, privacy support for the AddressBookUI framework is reenabled for apps linked against the iOS 7 SDK. Apps linked against older SDKs are not changed. If your app uses any of the Address Book view controllers, you should verify that it still behaves as expected.

The question is what can one do if the view controllers do not still behave as expected.

What does it mean to have "privacy support reenabled"?

I came across this because our app can no longer access the Microsoft Exchange ActiveSync Global Address List from the ABPeoplePickerNavigationController groups. So no, it is not behaving as expected (how it behaves in iOS 6).

Edit: this has been fixed as of iOS 7.0.3 (perhaps earlier)

Sam
  • 5,892
  • 1
  • 25
  • 27

1 Answers1

0

We have the same issue that Sam is having on our App as well. This happens when the user is trying to import a contact using the ABPeoplePickerNavigationController and getting to the Groups page:

  • Sometimes the title from the navigation controller will contain 2 names: Contacts AND Groups
  • Tapping the OK button can then be tricky and most users will report a freeze, while it's only impossible to quit the ABPeoplePickerNavigationController
  • Access to the Exchange Global Address List seems allowed but does not display any data, just an empty tableView

Following Sam's highlight, we thought about expressly requesting user permission to access their Address Book. Since iOS 6 introduced this, we did not used it for importing contacts as the ABPeoplePickerNavigationController is handling this itself.

Anyhow, we have been using:

ABAddressBookRef addressBook = ABAddressBookCreate();

__block BOOL accessGranted = NO;
if (ABAddressBookRequestAccessWithCompletion != NULL) { // we're on iOS 6
    dispatch_semaphore_t sema = dispatch_semaphore_create(0);
    ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
    accessGranted = granted;
    dispatch_semaphore_signal(sema);
});
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
dispatch_release(sema);   
}
else { // we're on iOS 5 or older
    accessGranted = YES;
}

if (accessGranted) {
    // Do whatever you want here.
}

see here for more information: Programmatically Request Access to Contacts

This does not solve the issue as access was already correctly granted.

We did reset the privacy settings in Settings / General / Reset / Reset Location and Privacy.

Access to the user's contact list is requested correctly as expected but the above mentioned behavior is still the same.

If anyone has any explanation on how to solve this, it would be great.

Regards,

Community
  • 1
  • 1
  • From Apple Dev forum, apparently a bug: [link](https://devforums.apple.com/message/890870#890870). We filed a radar [link](http://openradar.appspot.com/radar?id=5718998062727168). Sam, could you add one as well ? – Chevenement David Oct 02 '13 at 08:23
  • 1
    filed bug report with Apple and submitted [radar](http://openradar.appspot.com/radar?id=6605994708697088) – Sam Oct 14 '13 at 15:15