Question

Is there anyway to use the great address book UI with custom data? From looking through the AB documentation all you can do is to use

ABAddressBookRef ABAddressBookCreate (
   void
);

But this obviously creates a reference to the contacts on your phone... is there anyway that I can create a reference to say an array which I could then populate with my own independent contacts?

Thanks in advance.

Was it helpful?

Solution

Unfortunately, no. You can't create an special ABAddressBookRef that is associated with something other than the device's contacts database, and that's what you would need in order to use something like ABPeoplePickerNavigationController with a custom set of contacts. The Address Book APIs on the iPhone are relatively limited (and sometimes buggy or unpredictable), so I urge you to file bugs on http://bugreporter.apple.com requesting functionality that you would find useful to be added to the APIs.

In the mean time, however, you would be left mostly with the sole choice of implementing your own version of any built-in view controllers that you wanted to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top